From 7c9d46765beeaed45971b98f5df0193688e37eab Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 1 Dec 2003 07:47:54 +0000 Subject: Removed some unnecessary / commented out code, and initialized the debug console a bit earlier so that error messages about missing files will be more obvious to the user. (If an error happens that early, some of the debugger commands will cause ScummVM to crash. I might look into that later.) svn-id: r11443 --- sword2/console.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'sword2/console.cpp') diff --git a/sword2/console.cpp b/sword2/console.cpp index a7461107b7..490514cac6 100644 --- a/sword2/console.cpp +++ b/sword2/console.cpp @@ -123,19 +123,25 @@ void Debugger::varSet(int var, int val) { void Debugger::preEnter() { // Pause sound output - _vm->_sound->pauseFx(); - _vm->_sound->pauseSpeech(); - _vm->_sound->pauseMusic(); + if (_vm->_sound) { + _vm->_sound->pauseFx(); + _vm->_sound->pauseSpeech(); + _vm->_sound->pauseMusic(); + } } void Debugger::postEnter() { - // Resume previous sound state - _vm->_sound->unpauseFx(); - _vm->_sound->unpauseSpeech(); - _vm->_sound->unpauseMusic(); + if (_vm->_sound) { + // Resume previous sound state + _vm->_sound->unpauseFx(); + _vm->_sound->unpauseSpeech(); + _vm->_sound->unpauseMusic(); + } - // Restore old mouse cursor - _vm->_graphics->drawMouse(); + if (_vm->_graphics) { + // Restore old mouse cursor + _vm->_graphics->drawMouse(); + } } /////////////////////////////////////////////////// -- cgit v1.2.3