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) svn-id: r52524
This commit is contained in:
parent
8a93da0516
commit
34195238bb
1 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,9 @@ void Script::freeScript() {
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue