[Scummvm-cvs-logs] SF.net SVN: scummvm:[52524] scummvm/trunk/engines/sci/engine/script.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Sep 4 17:38:24 CEST 2010
Revision: 52524
http://scummvm.svn.sourceforge.net/scummvm/?rev=52524&view=rev
Author: thebluegr
Date: 2010-09-04 15:38:24 +0000 (Sat, 04 Sep 2010)
Log Message:
-----------
SCI: Don't try to initialize non-existent scripts, error out instead
(Invalid scripts may be requested to be loaded when warping to an incorrect room)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/script.cpp
Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp 2010-09-04 14:46:29 UTC (rev 52523)
+++ scummvm/trunk/engines/sci/engine/script.cpp 2010-09-04 15:38:24 UTC (rev 52524)
@@ -69,6 +69,9 @@
void Script::init(int script_nr, ResourceManager *resMan) {
Resource *script = resMan->findResource(ResourceId(kResourceTypeScript, script_nr), 0);
+ if (!script)
+ error("Script %d not found\n", script_nr);
+
_localsOffset = 0;
_localsBlock = NULL;
_localsCount = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list