summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index fed19d78f11..0a452826451 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -276,7 +276,7 @@ CommandObject::CheckRequirements (CommandReturnObject &result)
{
Target *target = m_exe_ctx.GetTargetPtr();
if (target)
- m_api_locker.Lock (target->GetAPIMutex());
+ m_api_locker = std::unique_lock<std::recursive_mutex>(target->GetAPIMutex());
}
}
@@ -336,7 +336,8 @@ void
CommandObject::Cleanup ()
{
m_exe_ctx.Clear();
- m_api_locker.Unlock();
+ if (m_api_locker.owns_lock())
+ m_api_locker.unlock();
}
int
OpenPOWER on IntegriCloud