From 9e4087372bee8e6918048cd8f4844ac1ebb90b9f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 31 Jan 2010 13:53:10 +0000 Subject: [PATCH] SystemProfiler::EventOccurred(): We must not access the object after releasing our reference to it. So return immediately after having done that. Previously the _MaybeNotifyProfilerThread() that innocently lurked at the end of the method would be invoked, playing with the dead beef. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35357 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/debug/system_profiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/debug/system_profiler.cpp b/src/system/kernel/debug/system_profiler.cpp index a3fa4fcbae..e5f0abb95b 100644 --- a/src/system/kernel/debug/system_profiler.cpp +++ b/src/system/kernel/debug/system_profiler.cpp @@ -612,9 +612,10 @@ SystemProfiler::EventOccurred(NotificationService& service, locker.Unlock(); RemoveReference(); - } else - _TeamRemoved(team); + return; + } + _TeamRemoved(team); break; case TEAM_EXEC: