erase() shrinks the vector, so we decrement the handler. Fixes the crash in case there are invalid handlers (Time application, for example). Should be fixed in the other _SendNotices() call too ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20183 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -688,6 +688,7 @@ ObserverList::_ValidateHandlers(uint32 what)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
handlers.erase(iterator);
|
handlers.erase(iterator);
|
||||||
|
iterator--;
|
||||||
Add(target, what);
|
Add(target, what);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user