diff options
Diffstat (limited to 'engines/gob/game.cpp')
-rw-r--r-- | engines/gob/game.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index e569daed53..c74f4b587d 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -354,10 +354,13 @@ void Game::freeSoundSlot(int16 slot) { if (_soundADL[slot]) { if (_vm->_adlib && (_vm->_adlib->getIndex() == slot)) _vm->_adlib->stopPlay(); + if (_soundFromExt[slot] == 1) { - delete[] ((char *) _soundSamples[slot]); + delete[] _soundSamples[slot]->data; _soundFromExt[slot] = 0; } + + delete _soundSamples; } else { char* data = _soundSamples[slot]->data; |