aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/savegame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r--engines/sci/engine/savegame.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 7c0b33a6d6..7677157f48 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -619,7 +619,7 @@ static void sync_songlib(Common::Serializer &s, SongLibrary &obj) {
void SciMusic::saveLoadWithSerializer(Common::Serializer &s) {
// Sync song lib data. When loading, the actual song lib will be initialized
// afterwards in gamestate_restore()
- _mutex.lock();
+ Common::StackLock lock(_mutex);
int songcount = 0;
byte masterVolume = soundGetMasterVolume();
@@ -645,7 +645,7 @@ void SciMusic::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsUint32LE(songcount);
if (s.isLoading()) {
- stopAll();
+ clearPlayList();
for (int i = 0; i < songcount; i++) {
MusicEntry *curSong = new MusicEntry();
@@ -657,8 +657,6 @@ void SciMusic::saveLoadWithSerializer(Common::Serializer &s) {
syncSong(s, _playList[i]);
}
}
-
- _mutex.unlock();
}
#endif