Check the return value of UIT_CreatePopupWindow() in UIT_ShowDevTools() to avoid a crash when canceling the popup window (issue #285).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@274 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
dadd852cd3
commit
f0d1898928
|
@ -1424,9 +1424,11 @@ void CefBrowserImpl::UIT_ShowDevTools()
|
||||||
|
|
||||||
CefPopupFeatures features;
|
CefPopupFeatures features;
|
||||||
CefRefPtr<CefBrowserImpl> browser = UIT_CreatePopupWindow(url, features);
|
CefRefPtr<CefBrowserImpl> browser = UIT_CreatePopupWindow(url, features);
|
||||||
browser->UIT_CreateDevToolsClient(dev_tools_agent_.get());
|
if (browser.get()) {
|
||||||
browser->UIT_LoadURL(browser->GetMainFrame(), url);
|
browser->UIT_CreateDevToolsClient(dev_tools_agent_.get());
|
||||||
browser->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
browser->UIT_LoadURL(browser->GetMainFrame(), url);
|
||||||
|
browser->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Give focus to the existing inspector window.
|
// Give focus to the existing inspector window.
|
||||||
client->browser()->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
client->browser()->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
||||||
|
|
Loading…
Reference in New Issue