From 036390f4c2a3fa69b743b43d4d3338a960f5ff57 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 14 Dec 2016 17:31:31 +0100 Subject: [PATCH] fix potential invalid lock --- libs/pbd/pbd/abstract_ui.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/pbd/pbd/abstract_ui.cc b/libs/pbd/pbd/abstract_ui.cc index de480e13bc..d37b3e2f74 100644 --- a/libs/pbd/pbd/abstract_ui.cc +++ b/libs/pbd/pbd/abstract_ui.cc @@ -239,15 +239,14 @@ AbstractUI::handle_ui_requests () rbml.acquire (); if (vec.buf[0]->invalidation) { DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1: removing invalidation record for that request\n", event_loop_name())); - Glib::Threads::Mutex::Lock li (vec.buf[0]->invalidation->event_loop->slot_invalidation_mutex(), Glib::Threads::NOT_LOCK); if (vec.buf[0]->invalidation->event_loop && vec.buf[0]->invalidation->event_loop != this) { - li.acquire (); + vec.buf[0]->invalidation->event_loop->slot_invalidation_mutex().lock (); } //if (!(*i).second->dead) { vec.buf[0]->invalidation->requests.remove (vec.buf[0]); //} if (vec.buf[0]->invalidation->event_loop && vec.buf[0]->invalidation->event_loop != this) { - li.release (); + vec.buf[0]->invalidation->event_loop->slot_invalidation_mutex().unlock (); } } else { DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1: no invalidation record for that request\n", event_loop_name()));