From 63614c925fcb6023c9bebd175a61baaaadd422db Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 11 Jul 2012 21:40:40 +0000 Subject: [PATCH] Don't call DoOnRemoval if you are just peeking at events. llvm-svn: 160079 --- lldb/source/Core/Listener.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lldb/source/Core/Listener.cpp b/lldb/source/Core/Listener.cpp index 6b1b95a59c6e..82d3285517e4 100644 --- a/lldb/source/Core/Listener.cpp +++ b/lldb/source/Core/Listener.cpp @@ -304,7 +304,11 @@ Listener::FindNextEventInternal // it so it should be okay to get the next event off the queue here - and it might // be useful to do that in the "DoOnRemoval". lock.Unlock(); - event_sp->DoOnRemoval(); + + // Don't call DoOnRemoval if you aren't removing the event... + if (remove) + event_sp->DoOnRemoval(); + return true; }