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:
Marshall Greenblatt
2011-10-21 21:00:59 +00:00
parent fb2eb5f4b5
commit c422ab5aa8
5 changed files with 21 additions and 6 deletions

View File

@@ -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;
}