Two segfault and several coding style related fixes

svn-id: r22954
This commit is contained in:
Sven Hesse 2006-06-06 15:43:44 +00:00
parent 9a46b6047d
commit bf86b9b022
8 changed files with 24 additions and 20 deletions

View file

@ -404,7 +404,10 @@ void Game::freeSoundSlot(int16 slot) {
if (_soundADL[slot]) {
_vm->_music->stopPlay();
if (_soundFromExt[slot] == 1) {
delete[] ((char *) _soundSamples[slot]);
_soundFromExt[slot] = 0;
}
} else {
char* data = _soundSamples[slot]->data;

View file

@ -1821,6 +1821,7 @@ void Goblin::zeroObjects(void) {
void Goblin::freeAllObjects(void) {
_vm->_util->deleteList(_objList);
_objList = 0;
freeObjects();
}