aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2011-08-09 15:04:26 +0200
committerJohannes Schickel2011-08-09 15:04:26 +0200
commit00d25a77a9d8297fdc356c7a10f9dc2d94903a5f (patch)
tree6e0e245ff7784951043a0a4cda1d006c9ea721c8
parenta72ab2f448b880a30dbce319808fca64c4121e40 (diff)
downloadscummvm-rg350-00d25a77a9d8297fdc356c7a10f9dc2d94903a5f.tar.gz
scummvm-rg350-00d25a77a9d8297fdc356c7a10f9dc2d94903a5f.tar.bz2
scummvm-rg350-00d25a77a9d8297fdc356c7a10f9dc2d94903a5f.zip
RECORDER: Defer mutex deletion to destructor.
Since we now call deinit after a game has been run, otherwise RTL would be broken. See bug report #3388982 "valgrind errors when doing multiple RTL".
-rw-r--r--common/EventRecorder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp
index 73832482f2..3be3161203 100644
--- a/common/EventRecorder.cpp
+++ b/common/EventRecorder.cpp
@@ -133,6 +133,9 @@ EventRecorder::EventRecorder() {
EventRecorder::~EventRecorder() {
deinit();
+
+ g_system->deleteMutex(_timeMutex);
+ g_system->deleteMutex(_recorderMutex);
}
void EventRecorder::init() {
@@ -282,9 +285,6 @@ void EventRecorder::deinit() {
//TODO: remove recordTempFileName'ed file
}
-
- g_system->deleteMutex(_timeMutex);
- g_system->deleteMutex(_recorderMutex);
}
void EventRecorder::registerRandomSource(RandomSource &rnd, const String &name) {