[Scummvm-cvs-logs] scummvm master -> 48140a012d69d76de5ae80de7ca926e71c39cd03
bluegr
md5 at scummvm.org
Fri May 27 02:07:56 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
48140a012d SCI: Don't attempt to modify null/disposed objects.
Commit: 48140a012d69d76de5ae80de7ca926e71c39cd03
https://github.com/scummvm/scummvm/commit/48140a012d69d76de5ae80de7ca926e71c39cd03
Author: md5 (md5 at scummvm.org)
Date: 2011-05-26T17:06:06-07:00
Commit Message:
SCI: Don't attempt to modify null/disposed objects.
These cases occur usually because of script bugs. Fixes script bug
#3303802 - "SCI: PQ1VGA - Crash at the jail"
Changed paths:
engines/sci/engine/vm.cpp
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 4995749..af34e6d 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -297,6 +297,13 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt
if (argc > 0x800) // More arguments than the stack could possibly accomodate for
error("send_selector(): More than 0x800 arguments to function call");
+ if (send_obj.isNull()) {
+ warning("Attempt to invoke a selector of a null/disposed object. Ignoring call");
+ framesize -= (2 + argc);
+ argp += argc + 1;
+ continue;
+ }
+
SelectorType selectorType = lookupSelector(s->_segMan, send_obj, selector, &varp, &funcp);
if (selectorType == kSelectorNone)
error("Send to invalid selector 0x%x of object at %04x:%04x", 0xffff & selector, PRINT_REG(send_obj));
More information about the Scummvm-git-logs
mailing list