Null out the browser reference in ClientHandler-OnBeforeClose

This commit is contained in:
Corey Johnson & Nathan Sobo 2012-08-24 17:48:27 -06:00
parent c71896b8c7
commit dba2304e6e

View File

@ -54,6 +54,15 @@ bool ClientHandler::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
void ClientHandler::OnBeforeClose(CefRefPtr<CefBrowser> 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<CefBrowser> browser) {