diff options
author | Travis Howell | 2004-10-08 06:52:08 +0000 |
---|---|---|
committer | Travis Howell | 2004-10-08 06:52:08 +0000 |
commit | 970a782edf005540067424c104e615e392439235 (patch) | |
tree | 81dd21095b55f3921064ac16645688c7de722ceb /scumm/script_v6.cpp | |
parent | 94d9a2149b8b757ed36cb0f315cd281d1447d1a0 (diff) | |
download | scummvm-rg350-970a782edf005540067424c104e615e392439235.tar.gz scummvm-rg350-970a782edf005540067424c104e615e392439235.tar.bz2 scummvm-rg350-970a782edf005540067424c104e615e392439235.zip |
Small correction
Ensure object exists, before pushing data.
svn-id: r15463
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r-- | scumm/script_v6.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index eadcff9cb9..5c9fce7ec9 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2709,18 +2709,22 @@ void ScummEngine_v6::o6_kernelGetFunctions() { break; case 207: i = getObjectIndex(args[1]); + assert(i); push(_objs[i].x_pos); break; case 208: i = getObjectIndex(args[1]); + assert(i); push(_objs[i].y_pos); break; case 209: i = getObjectIndex(args[1]); + assert(i); push(_objs[i].width); break; case 210: i = getObjectIndex(args[1]); + assert(i); push(_objs[i].height); break; case 211: @@ -2931,7 +2935,7 @@ void ScummEngine_v6::o6_stampObject() { state = 1; int objnum = getObjectIndex(object); - if (objnum == 0) + if (objnum == -1) return; if (x != -1) { |