From dba2304e6ef0e49047a1b92ec18749ce96871b70 Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Fri, 24 Aug 2012 17:48:27 -0600 Subject: [PATCH] Null out the browser reference in ClientHandler-OnBeforeClose --- atom/client_handler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/atom/client_handler.cpp b/atom/client_handler.cpp index 008cfeeb4..668332136 100644 --- a/atom/client_handler.cpp +++ b/atom/client_handler.cpp @@ -54,6 +54,15 @@ bool ClientHandler::OnConsoleMessage(CefRefPtr browser, void ClientHandler::OnBeforeClose(CefRefPtr browser) { REQUIRE_UI_THREAD(); + + + // this was in cefclient... was there a good reason? +// if(m_BrowserHwnd == browser->GetWindowHandle()) { +// // Free the browser pointer so that the browser can be destroyed +// m_Browser = NULL; +// } + + m_Browser = NULL; } void ClientHandler::OnAfterCreated(CefRefPtr browser) {