From 970a782edf005540067424c104e615e392439235 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 8 Oct 2004 06:52:08 +0000 Subject: Small correction Ensure object exists, before pushing data. svn-id: r15463 --- scumm/script_v6.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scumm/script_v6.cpp') 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) { -- cgit v1.2.3