Fix crash during window close when no CefClient is provided.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1228 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-04-17 18:33:26 +00:00
parent c41127f236
commit 19d9ebd063

View File

@ -1505,7 +1505,7 @@ void CefBrowserHostImpl::CloseContents(content::WebContents* source) {
// If this method is called in response to something other than
// WindowDestroyed() ask the user if the browser should close.
if (IsWindowRenderingDisabled() || !window_destroyed_) {
if (client_.get() && (IsWindowRenderingDisabled() || !window_destroyed_)) {
CefRefPtr<CefLifeSpanHandler> handler =
client_->GetLifeSpanHandler();
if (handler.get()) {