Be sure to take the mutex when the destructor is called in case other threads are using these lists and those other threads have the mutex locked.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178262 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/StackFrameList.cpp b/source/Target/StackFrameList.cpp
index d9d5544..39aa1bc 100644
--- a/source/Target/StackFrameList.cpp
+++ b/source/Target/StackFrameList.cpp
@@ -65,6 +65,9 @@
 //----------------------------------------------------------------------
 StackFrameList::~StackFrameList()
 {
+    // Call clear since this takes a lock and clears the stack frame list
+    // in case another thread is currently using this stack frame list
+    Clear();
 }
 
 void