diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp index 73832482f27..3be31612030 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) {