mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Allow for cases where CefBrowserImpl::UIT_CreateBrowser() may fail (issue #322).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@336 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -153,7 +153,8 @@ CefRefPtr<CefBrowser> CefBrowser::CreateBrowserSync(
|
||||
|
||||
CefRefPtr<CefBrowser> browser(
|
||||
new CefBrowserImpl(windowInfo, settings, NULL, client));
|
||||
static_cast<CefBrowserImpl*>(browser.get())->UIT_CreateBrowser(url);
|
||||
if (!static_cast<CefBrowserImpl*>(browser.get())->UIT_CreateBrowser(url))
|
||||
return NULL;
|
||||
|
||||
return browser;
|
||||
}
|
||||
@@ -1142,7 +1143,8 @@ CefRefPtr<CefBrowserImpl> CefBrowserImpl::UIT_CreatePopupWindow(
|
||||
|
||||
// Don't pass the URL to UIT_CreateBrowser for popup windows or the URL will
|
||||
// be loaded twice.
|
||||
browser->UIT_CreateBrowser(CefString());
|
||||
if (!browser->UIT_CreateBrowser(CefString()))
|
||||
return NULL;
|
||||
|
||||
return browser;
|
||||
}
|
||||
|
Reference in New Issue
Block a user