From 945115f09927ff2e9e7d5197524bb929f4ba5561 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 19:45:04 +0200 Subject: [PATCH] GOB: Don't crash when the engine wasn't fully initialized on exit --- engines/gob/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 0d1953322f5..de0c3f2d5c1 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -64,7 +64,7 @@ void Environments::clear() { // Deleting unique variables, script and resources for (uint i = 0; i < kEnvironmentCount; i++) { - if (_environments[i].variables == _vm->_inter->_variables) + if (_vm->_inter && (_environments[i].variables == _vm->_inter->_variables)) continue; if (!has(_environments[i].variables, i + 1))