From 26e68c3d26e4ff193358abe7b25060b4ad860459 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 3 Dec 2015 13:40:11 -0500 Subject: [PATCH] Fix crash when receiving a title change notification without a navigation entry (issue #1764) --- libcef/browser/browser_host_impl.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index ab52522fb..5b6eaccfe 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -2405,7 +2405,12 @@ void CefBrowserHostImpl::FrameDeleted( void CefBrowserHostImpl::TitleWasSet(content::NavigationEntry* entry, bool explicit_set) { - OnTitleChange(entry->GetTitle()); + // |entry| may be NULL if a popup is created via window.open and never + // navigated. + if (entry) + OnTitleChange(entry->GetTitle()); + else if (web_contents()) + OnTitleChange(web_contents()->GetTitle()); } void CefBrowserHostImpl::PluginCrashed(const base::FilePath& plugin_path,