[Scummvm-cvs-logs] SF.net SVN: scummvm:[45137] scummvm/trunk/engines/draci
spalek at users.sourceforge.net
spalek at users.sourceforge.net
Fri Oct 16 01:57:14 CEST 2009
Revision: 45137
http://scummvm.svn.sourceforge.net/scummvm/?rev=45137&view=rev
Author: spalek
Date: 2009-10-15 23:57:13 +0000 (Thu, 15 Oct 2009)
Log Message:
-----------
Don't crash without sound support.
Modified Paths:
--------------
scummvm/trunk/engines/draci/detection.cpp
scummvm/trunk/engines/draci/sound.cpp
Modified: scummvm/trunk/engines/draci/detection.cpp
===================================================================
--- scummvm/trunk/engines/draci/detection.cpp 2009-10-15 22:09:15 UTC (rev 45136)
+++ scummvm/trunk/engines/draci/detection.cpp 2009-10-15 23:57:13 UTC (rev 45137)
@@ -143,9 +143,13 @@
Common::InSaveFile *in = saveFileMan->openForLoading(*file);
if (in) {
Draci::DraciSavegameHeader header;
- Draci::readSavegameHeader(in, header);
- saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
- if (header.thumbnail) delete header.thumbnail;
+ if (Draci::readSavegameHeader(in, header)) {
+ saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
+ if (header.thumbnail) {
+ header.thumbnail->free();
+ delete header.thumbnail;
+ }
+ }
delete in;
}
}
Modified: scummvm/trunk/engines/draci/sound.cpp
===================================================================
--- scummvm/trunk/engines/draci/sound.cpp 2009-10-15 22:09:15 UTC (rev 45136)
+++ scummvm/trunk/engines/draci/sound.cpp 2009-10-15 23:57:13 UTC (rev 45137)
@@ -269,8 +269,12 @@
void Sound::setVolume() {
// TODO: how to retrieve "Mute All" ?
- _muteSound = ConfMan.getBool("sfx_mute");
- _muteVoice = ConfMan.getBool("speech_mute");
+ if (_mixer->isReady()) {
+ _muteSound = ConfMan.getBool("sfx_mute");
+ _muteVoice = ConfMan.getBool("speech_mute");
+ } else {
+ _muteSound = _muteVoice = true;
+ }
_showSubtitles = ConfMan.getBool("subtitles");
_talkSpeed = ConfMan.getInt("talkspeed");
const int soundVolume = ConfMan.getInt("sfx_volume");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list