aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/wage.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index 0cac983c8f..31df42474f 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -412,7 +412,8 @@ void WageEngine::processTurnInternal(Common::String *textInput, Designed *clickI
}
bool monsterWasNull = (_monster == NULL);
- bool handled = playerScene->_script->execute(_world, _loopCount++, textInput, clickInput, this);
+ Script *script = playerScene->_script != NULL ? playerScene->_script : _world->_globalScript;
+ bool handled = script->execute(_world, _loopCount++, textInput, clickInput, this);
playerScene = _world->_player->_currentScene;