aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2008-07-03 16:25:59 +0000
committerSven Hesse2008-07-03 16:25:59 +0000
commit56c6840ff72ab38a508aa0f46662ef7c636e410f (patch)
treecf5cf4961f3b26c8f8c8bbee57209dcc9f4467e2
parent59e672ef40e4c227c27022ec764f8b811b375220 (diff)
downloadscummvm-rg350-56c6840ff72ab38a508aa0f46662ef7c636e410f.tar.gz
scummvm-rg350-56c6840ff72ab38a508aa0f46662ef7c636e410f.tar.bz2
scummvm-rg350-56c6840ff72ab38a508aa0f46662ef7c636e410f.zip
Fixing a crash when loading a save made within the cult/bargon building (bug #2005965)
svn-id: r32895
-rw-r--r--engines/gob/goblin_v2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp
index 9144e35070..d763aeb01c 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;