From: Cheng Zhao Date: Fri, 9 May 2014 01:47:11 +0000 (+0800) Subject: Do not receive notifications after window is closed, fixes #265. X-Git-Tag: v0.12.4~11 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d10292d95c4184dd5391e2c956007f6c1cb7bfb7;p=electron.git Do not receive notifications after window is closed, fixes #265. --- diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 79b024ef..f7f069ac 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -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); }