TeamDebugHandler::_HandlerThread(): Remove and delete the team handler in any

case, not only when we kill the team, i.e. also when the team just died or we
handed it over to another debugger. We can do this, since it is also safe to
assume that we won't get any further debug messages from the team after a
B_DEBUGGER_MESSAGE_TEAM_DELETED or B_DEBUGGER_MESSAGE_HANDED_OVER. We were
leaking (well, keeping) the team handler in those cases, which was a problem
in the latter one, since we silently ate all debug messages for the team in
case it would be re-attached later. Fixes bug #2942.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29300 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-02-23 22:51:01 +00:00
parent 63448c92a4
commit cb5d702190

View File

@ -419,7 +419,6 @@ TeamDebugHandler::_PopMessage(DebugMessage *&message)
}
// _EnterDebugger
thread_id
TeamDebugHandler::_EnterDebugger()
{
@ -798,13 +797,13 @@ TeamDebugHandler::_HandlerThread()
if (kill) {
// kill the team
_KillTeam();
// remove this handler from the roster and delete it
TeamDebugHandlerRoster::Default()->RemoveHandler(fTeam);
delete this;
}
// remove this handler from the roster and delete it
TeamDebugHandlerRoster::Default()->RemoveHandler(fTeam);
delete this;
return B_OK;
}