From d8be645d5ab26415d39a201c688b0f176ebd8925 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 29 Apr 2015 08:57:49 +0530 Subject: [PATCH] webContents: check for navigation entry before using --- atom/browser/api/atom_api_web_contents.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 0400e9457e37..d6e0b170ce4d 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(