Do not receive notifications after window is closed, fixes #265.

This commit is contained in:
Cheng Zhao 2014-05-09 09:47:11 +08:00
parent 676b1e0bc7
commit d10292d95c

View file

@ -357,6 +357,10 @@ void NativeWindow::NotifyWindowClosed() {
is_closed_ = true;
FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowClosed());
// Do not receive any notification after window has been closed, there is a
// crash that seems to be caused by this: http://git.io/YqMG5g.
registrar_.RemoveAll();
WindowList::RemoveWindow(this);
}