aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-28 10:31:37 +0000
committerFilippos Karapetis2010-01-28 10:31:37 +0000
commit858eb1a283892d0dad25fad24546ceab4a9b7269 (patch)
tree7c129b96325e7cdec586147e1c8b3cd76e677ad8 /engines/sci
parent42c4316f98bd4b5042a058a0fbb2a20bb1f7398d (diff)
downloadscummvm-rg350-858eb1a283892d0dad25fad24546ceab4a9b7269.tar.gz
scummvm-rg350-858eb1a283892d0dad25fad24546ceab4a9b7269.tar.bz2
scummvm-rg350-858eb1a283892d0dad25fad24546ceab4a9b7269.zip
Don't attempt to pause/resume sounds when the debug console opens if the sound subsystem hasn't been initialized yet
svn-id: r47639
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/console.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 57131d980f..4c8fd2172a 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -201,7 +201,8 @@ void Console::preEnter() {
if (_vm->_gamestate)
_vm->_gamestate->_sound.sfx_suspend(true);
#endif
- _vm->getEngineState()->_soundCmd->pauseAll(true);
+ if (_vm->getEngineState() && _vm->getEngineState()->_soundCmd)
+ _vm->getEngineState()->_soundCmd->pauseAll(true);
}
void Console::postEnter() {
@@ -209,7 +210,8 @@ void Console::postEnter() {
if (_vm->_gamestate)
_vm->_gamestate->_sound.sfx_suspend(false);
#endif
- _vm->getEngineState()->_soundCmd->pauseAll(false);
+ if (_vm->getEngineState() && _vm->getEngineState()->_soundCmd)
+ _vm->getEngineState()->_soundCmd->pauseAll(false);
if (!_videoFile.empty()) {
_vm->_gamestate->_gui->hideCursor();