From 7cd53aea4d4c5fa0c3eb1d1ae12f68ae7f7fe704 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 1 Feb 2011 15:45:38 +0000 Subject: [PATCH] Fix a crash when closing the browser window with WebKit Inspector open (issue #182). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@180 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/browser_impl.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libcef/browser_impl.cc b/libcef/browser_impl.cc index 5aa35f247..84fe29ecc 100644 --- a/libcef/browser_impl.cc +++ b/libcef/browser_impl.cc @@ -523,11 +523,12 @@ void CefBrowserImpl::UIT_DestroyBrowser() if (dev_tools_agent_.get()) { BrowserDevToolsClient* client = dev_tools_agent_->client(); if (client) { + CefBrowserImpl* browser = client->browser(); // Destroy the client before freeing the agent. - client->browser()->UIT_DestroyDevToolsClient(); + browser->UIT_DestroyDevToolsClient(); if(!_Context->shutting_down()) { // Explicitly close the client browser window. - client->browser()->UIT_CloseBrowser(); + browser->UIT_CloseBrowser(); } } // Free the agent.