* If a handler goes away that has an looper, we should remove us from the

loppers fHandlers list, otherwise we might end up with a dangeling pointer.

  This should fix the crashes seen in Cortex and Icon-O-Matic on app close.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26383 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich
2008-07-11 20:07:00 +00:00
parent 674e234e11
commit 731b9ac77c
+5
View File
@@ -131,6 +131,11 @@ BHandler::BHandler(const char *name)
BHandler::~BHandler()
{
if (LockLooper()) {
Looper()->RemoveHandler(this);
UnlockLooper();
}
// remove all filters
if (fFilters) {
int32 count = fFilters->CountItems();