mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-01 10:27:44 +01:00
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;
|
||||
CefRefPtr<CefBrowserImpl> browser = UIT_CreatePopupWindow(url, features);
|
||||
browser->UIT_CreateDevToolsClient(dev_tools_agent_.get());
|
||||
browser->UIT_LoadURL(browser->GetMainFrame(), url);
|
||||
browser->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
||||
if (browser.get()) {
|
||||
browser->UIT_CreateDevToolsClient(dev_tools_agent_.get());
|
||||
browser->UIT_LoadURL(browser->GetMainFrame(), url);
|
||||
browser->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
||||
}
|
||||
} else {
|
||||
// Give focus to the existing inspector window.
|
||||
client->browser()->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
||||
|
Loading…
x
Reference in New Issue
Block a user