From 190e3779761e2af587e0d1edccf3cf54452e52de Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 13 Oct 2007 16:15:49 +0000 Subject: [PATCH] ppInfoList deletes its elements on destruction, and we didn't clear our temporary list after deleting its elements manually. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22534 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/registrar/TRoster.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/servers/registrar/TRoster.cpp b/src/servers/registrar/TRoster.cpp index 008ca95353..293c2d3979 100644 --- a/src/servers/registrar/TRoster.cpp +++ b/src/servers/registrar/TRoster.cpp @@ -1279,13 +1279,16 @@ TRoster::CheckSanity() if (!(*it)->IsRunning()) obsoleteApps.AddInfo(*it); } + // remove the apps for (AppInfoList::Iterator it = obsoleteApps.It(); it.IsValid(); ++it) { RemoveApp(*it); delete *it; } + obsoleteApps.MakeEmpty(false); + // don't delete infos a second time + // early pre-registered applications - obsoleteApps.MakeEmpty(); bigtime_t timeLimit = system_time() - kMaximalEarlyPreRegistrationPeriod; for (AppInfoList::Iterator it = fEarlyPreRegisteredApps.It(); it.IsValid(); @@ -1293,11 +1296,14 @@ TRoster::CheckSanity() if ((*it)->registration_time < timeLimit) obsoleteApps.AddInfo(*it); } + // remove the apps for (AppInfoList::Iterator it = obsoleteApps.It(); it.IsValid(); ++it) { fEarlyPreRegisteredApps.RemoveInfo(*it); delete *it; } + obsoleteApps.MakeEmpty(false); + // don't delete infos a second time } // SetShuttingDown