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
This commit is contained in:
Marshall Greenblatt 2011-02-01 15:45:38 +00:00
parent d2ce65040e
commit 7cd53aea4d
1 changed files with 3 additions and 2 deletions

View File

@ -523,11 +523,12 @@ void CefBrowserImpl::UIT_DestroyBrowser()
if (dev_tools_agent_.get()) { if (dev_tools_agent_.get()) {
BrowserDevToolsClient* client = dev_tools_agent_->client(); BrowserDevToolsClient* client = dev_tools_agent_->client();
if (client) { if (client) {
CefBrowserImpl* browser = client->browser();
// Destroy the client before freeing the agent. // Destroy the client before freeing the agent.
client->browser()->UIT_DestroyDevToolsClient(); browser->UIT_DestroyDevToolsClient();
if(!_Context->shutting_down()) { if(!_Context->shutting_down()) {
// Explicitly close the client browser window. // Explicitly close the client browser window.
client->browser()->UIT_CloseBrowser(); browser->UIT_CloseBrowser();
} }
} }
// Free the agent. // Free the agent.