diff options
author | Paweł Kołodziejski | 2002-10-27 10:02:11 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2002-10-27 10:02:11 +0000 |
commit | 8697f942eccf8e1cb7dcad23330a48ceb991750d (patch) | |
tree | c5efb97129e6c01d1734cca4ebe12b37f40f5259 | |
parent | 390ce3dada285462d361644c7e064952b8742820 (diff) | |
download | scummvm-rg350-8697f942eccf8e1cb7dcad23330a48ceb991750d.tar.gz scummvm-rg350-8697f942eccf8e1cb7dcad23330a48ceb991750d.tar.bz2 scummvm-rg350-8697f942eccf8e1cb7dcad23330a48ceb991750d.zip |
check if _imuse is initialized
svn-id: r5331
-rw-r--r-- | scumm/dialogs.cpp | 7 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp index 47d994a84f..0e3f7a8dfa 100644 --- a/scumm/dialogs.cpp +++ b/scumm/dialogs.cpp @@ -596,8 +596,11 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data _scumm->_sound->_sound_volume_music = _soundVolumeMusic; // Music _scumm->_sound->_sound_volume_sfx = _soundVolumeSfx; // SFX - _scumm->_imuse->set_music_volume(_soundVolumeMusic); - _scumm->_imuse->set_master_volume(_soundVolumeMaster); + if (_scumm->_imuse) { + _scumm->_imuse->set_music_volume(_soundVolumeMusic); + _scumm->_imuse->set_master_volume(_soundVolumeMaster); + } + _scumm->_mixer->setVolume(_soundVolumeSfx); _scumm->_mixer->setMusicVolume(_soundVolumeMusic); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 0ae28c48d1..600b9a6398 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -1060,12 +1060,16 @@ void Scumm::processKbd() _sound->_sound_volume_master-=5; if (_sound->_sound_volume_master < 0) _sound->_sound_volume_master = 0; - _imuse->set_master_volume(_sound->_sound_volume_master); + if (_imuse) { + _imuse->set_master_volume(_sound->_sound_volume_master); + } } else if (_lastKeyHit == ']') { // ] volume down _sound->_sound_volume_master+=5; if (_sound->_sound_volume_master > 128) _sound->_sound_volume_master = 128; - _imuse->set_master_volume(_sound->_sound_volume_master); + if (_imuse) { + _imuse->set_master_volume(_sound->_sound_volume_master); + } } else if (_lastKeyHit == '-') { // - text speed down _defaultTalkDelay+=5; if (_defaultTalkDelay > 90) |