diff options
author | Thierry Crozat | 2011-04-24 14:33:20 +0100 |
---|---|---|
committer | Thierry Crozat | 2011-04-24 14:39:50 +0100 |
commit | c2eb927ab351b5133fe641c83108e774a4c879bb (patch) | |
tree | 8c85ead8bc8002ac14da4053a098629538099c9b /engines | |
parent | 0f2eaf848fde4832dc52f7ffdd73930073822a01 (diff) | |
download | scummvm-rg350-c2eb927ab351b5133fe641c83108e774a4c879bb.tar.gz scummvm-rg350-c2eb927ab351b5133fe641c83108e774a4c879bb.tar.bz2 scummvm-rg350-c2eb927ab351b5133fe641c83108e774a4c879bb.zip |
DRASCULA: Avoid crash in engine destructor after it failed to start.
This happens for example if the drascula.dat file is not found.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/drascula/rooms.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 7744374518..d6774cbc65 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -140,6 +140,9 @@ void DrasculaEngine::setupRoomsTable() { } void DrasculaEngine::freeRoomsTable() { + if (_roomHandlers == 0) + return; + for (uint32 i = 0; i < _roomHandlers->roomParsers.size(); i++) delete _roomHandlers->roomParsers[i]; _roomHandlers->roomParsers.clear(); |