Fix crash when receiving a title change notification without a navigation entry (issue #1764)

This commit is contained in:
Marshall Greenblatt 2015-12-03 13:40:11 -05:00
parent 9bc8da1e02
commit 26e68c3d26
1 changed files with 6 additions and 1 deletions

View File

@ -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,