diff options
author | Filippos Karapetis | 2010-01-28 10:31:37 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-28 10:31:37 +0000 |
commit | 858eb1a283892d0dad25fad24546ceab4a9b7269 (patch) | |
tree | 7c129b96325e7cdec586147e1c8b3cd76e677ad8 | |
parent | 42c4316f98bd4b5042a058a0fbb2a20bb1f7398d (diff) | |
download | scummvm-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
-rw-r--r-- | engines/sci/console.cpp | 6 |
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(); |