From 9bd51254c6556a6e560af421c29584158bf1ca6a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 7 Jan 2016 12:35:05 +0100 Subject: WAGE: Process scenes without scripts --- engines/wage/wage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/wage') 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; -- cgit v1.2.3