Skip to content
Snippets Groups Projects
Commit b6542291 authored by Eric Cano's avatar Eric Cano
Browse files

Removed wrong attempt to unlock in ~MutexLocker()

The unlocking should only be attempted if we still hold the lock (it was unconditional).
parent c921c3fe
No related branches found
No related tags found
No related merge requests found
......@@ -69,10 +69,12 @@ public:
* Destructor.
*/
~MutexLocker() {
try {
m_mutex.unlock();
} catch (...) {
// Ignore any exceptions
if (m_locked) {
try {
m_mutex.unlock();
} catch (...) {
// Ignore any exceptions
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment