mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 16:33:50 +00:00
- Cleanup
- LoL: fix memory leak svn-id: r40663
This commit is contained in:
parent
28b5f1d290
commit
bfe63b64a3
@ -400,6 +400,9 @@ LoLEngine::~LoLEngine() {
|
||||
delete[] _defaultLegendData;
|
||||
delete[] _mapCursorOverlay;
|
||||
delete[] _mapOverlay;
|
||||
|
||||
for (Common::Array<const SpellProc*>::iterator i = _spellProcs.begin(); i != _spellProcs.end(); ++i)
|
||||
delete *i;
|
||||
_spellProcs.clear();
|
||||
}
|
||||
|
||||
@ -544,6 +547,8 @@ Common::Error LoLEngine::go() {
|
||||
if (!_flags.isDemo && !_res->loadFileList("FILEDATA.FDT"))
|
||||
error("Couldn't load file list: 'FILEDATA.FDT'");
|
||||
|
||||
// Usually fonts etc. would be setup by the prologue code, if we skip
|
||||
// the prologue code we need to setup them manually here.
|
||||
if (_gameToLoad != -1)
|
||||
preInit();
|
||||
|
||||
|
@ -162,7 +162,7 @@ Common::Error KyraEngine_LoK::loadGameState(int slot) {
|
||||
// In the first version when this entry was introduced,
|
||||
// it wasn't made sure that _curSfxFile was initialized
|
||||
// so if it's out of bounds we just set it to 0.
|
||||
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
|
||||
if (_flags.platform == Common::kPlatformFMTowns) {
|
||||
if (_curSfxFile >= _soundData->fileListLen || _curSfxFile < 0)
|
||||
_curSfxFile = 0;
|
||||
_sound->loadSoundFile(_curSfxFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user