Don't call DoOnRemoval if you are just peeking at events.

llvm-svn: 160079
This commit is contained in:
Jim Ingham 2012-07-11 21:40:40 +00:00
parent f26054f0fb
commit 63614c925f
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}