From d17a268572648b8e45ba6dc5854549a1dbf81c0a Mon Sep 17 00:00:00 2001
From: Wander Nauta <info@wandernauta.nl>
Date: Sun, 19 Apr 2015 16:37:41 +0200
Subject: [PATCH] Move misplaced unlock of s_currentObjectMutex

The current implementation would unlock the mutex, even if it didn't own
it.
---
 pgadmin/frm/events.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pgadmin/frm/events.cpp b/pgadmin/frm/events.cpp
index 4baaf42..f2ad570 100644
--- a/pgadmin/frm/events.cpp
+++ b/pgadmin/frm/events.cpp
@@ -750,11 +750,11 @@ void frmMain::OnSelRightClick(wxTreeEvent &event)
 		//
 		s_currentObjectMutex.Lock();
 		currentObject = browser->GetObject(item);
+		s_currentObjectMutex.Unlock();
 	}
 
 	if (currentObject)
 		doPopup(browser, event.GetPoint(), currentObject);
-	s_currentObjectMutex.Unlock();
 }
 
 
-- 
2.3.5

