From 847ae5abe4b4403e9905f4232bd25267928c340b Mon Sep 17 00:00:00 2001 From: Robo Date: Sun, 12 Apr 2015 10:51:05 +0530 Subject: [PATCH] webContents: fix dereferencing null in getURL --- atom/browser/api/atom_api_web_contents.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 4c76f5349eb..1713fe9b7ea 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -360,6 +360,8 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) { GURL WebContents::GetURL() const { auto entry = web_contents()->GetController().GetLastCommittedEntry(); + if (!entry) + return GURL::EmptyGURL(); return entry->GetVirtualURL(); }