From 56c6840ff72ab38a508aa0f46662ef7c636e410f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 3 Jul 2008 16:25:59 +0000 Subject: [PATCH] Fixing a crash when loading a save made within the cult/bargon building (bug #2005965) svn-id: r32895 --- engines/gob/goblin_v2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp index 9144e350708..d763aeb01c6 100644 --- a/engines/gob/goblin_v2.cpp +++ b/engines/gob/goblin_v2.cpp @@ -88,7 +88,7 @@ void Goblin_v2::placeObject(Gob_Object *objDesc, char animated, (_vm->_scenery->_animBottom - _vm->_scenery->_animTop) - (y + 1) / 2; *obj->pPosX = x * _vm->_map->_tilesWidth; } else { - if (obj->goblinStates[state] != 0) { + if ((obj->goblinStates != 0) && (obj->goblinStates[state] != 0)) { layer = obj->goblinStates[state][0].layer; animation = obj->goblinStates[state][0].animation; objAnim->state = state;