mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Fixed some game crashes which occurred when ProjectReader::purgeCache() got called:
- MIDI music data is marked to be deleted in o1_STOPMUS now, instead of o1_PLAYMUS. - Added a FIXME to Screen::setFont() - purgeCache crashes the game if the active font is deleted svn-id: r31948
This commit is contained in:
@@ -599,8 +599,10 @@ void Screen::flash(int flashCount) {
|
||||
void Screen::setFont(int16 fontNum) {
|
||||
if (fontNum == _currentFontNum)
|
||||
return;
|
||||
if (_font)
|
||||
_vm->_res->freeResource(_font);
|
||||
// FIXME: this causes crashes when
|
||||
// ProjectReader::purgeCache() is called
|
||||
//if (_font)
|
||||
// _vm->_res->freeResource(_font);
|
||||
_font = _vm->_res->getFont(fontNum);
|
||||
_currentFontNum = fontNum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user