LAB: Close _curBitmap before deleting it

This commit is contained in:
Strangerke 2015-12-20 17:57:28 +01:00 committed by Willem Jan Palenstijn
parent b53735ba06
commit eba44d3094

View File

@ -105,8 +105,11 @@ void DisplayMan::readPict(const Common::String filename, bool playOnce, bool onl
} }
void DisplayMan::freePict() { void DisplayMan::freePict() {
delete _curBitmap; if (_curBitmap) {
_curBitmap = nullptr; _curBitmap->close();
delete _curBitmap;
_curBitmap = nullptr;
}
} }
Common::String DisplayMan::getWord(const char *mainBuffer) { Common::String DisplayMan::getWord(const char *mainBuffer) {