mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
LURE: Fixed memory leaks in the LURE engine
svn-id: r32675
This commit is contained in:
parent
dd423f803b
commit
a596879c8e
@ -103,6 +103,7 @@ LureEngine::~LureEngine() {
|
||||
if (_initialised) {
|
||||
// Delete and deinitialise subsystems
|
||||
Surface::deinitialise();
|
||||
Sound.destroy();
|
||||
delete _fights;
|
||||
delete _room;
|
||||
delete _menu;
|
||||
@ -164,14 +165,6 @@ void LureEngine::pauseEngineIntern(bool pause) {
|
||||
}
|
||||
}
|
||||
|
||||
/* This is not being used
|
||||
|
||||
void LureEngine::quitGame() {
|
||||
_system->quit();
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
const char *LureEngine::generateSaveName(int slotNumber) {
|
||||
static char buffer[15];
|
||||
|
||||
|
@ -85,8 +85,10 @@ SoundManager::~SoundManager() {
|
||||
if (_soundData)
|
||||
delete _soundData;
|
||||
|
||||
if (_driver)
|
||||
if (_driver) {
|
||||
_driver->close();
|
||||
delete _driver;
|
||||
}
|
||||
_driver = NULL;
|
||||
|
||||
g_system->deleteMutex(_soundMutex);
|
||||
@ -143,7 +145,7 @@ void SoundManager::bellsBodge() {
|
||||
Room &room = Room::getReference();
|
||||
|
||||
RoomData *roomData = res.getRoom(room.roomNumber());
|
||||
if (roomData->areaFlag != res.fieldList().getField(AREA_FLAG)) {
|
||||
if (roomData && roomData->areaFlag != res.fieldList().getField(AREA_FLAG)) {
|
||||
res.fieldList().setField(AREA_FLAG, roomData->areaFlag);
|
||||
|
||||
switch (roomData->areaFlag) {
|
||||
|
Loading…
Reference in New Issue
Block a user