* 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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user