From: deepak1556 Date: Wed, 29 Apr 2015 03:27:49 +0000 (+0530) Subject: webContents: check for navigation entry before using X-Git-Tag: v0.25.2~6^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d8be645d5ab26415d39a201c688b0f176ebd8925;p=electron.git webContents: check for navigation entry before using --- diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 0400e945..d6e0b170 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -258,7 +258,9 @@ void WebContents::DidNavigateMainFrame( void WebContents::TitleWasSet(content::NavigationEntry* entry, bool explicit_set) { - Emit("page-title-set", entry->GetTitle(), explicit_set); + // Back/Forward navigation may have pruned entries. + if (entry) + Emit("page-title-set", entry->GetTitle(), explicit_set); } void WebContents::DidUpdateFaviconURL(