From c2eb927ab351b5133fe641c83108e774a4c879bb Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 24 Apr 2011 14:33:20 +0100 Subject: DRASCULA: Avoid crash in engine destructor after it failed to start. This happens for example if the drascula.dat file is not found. --- engines/drascula/rooms.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines') 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(); -- cgit v1.2.3