Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / location_bar / page_info_helper.cc
index e92f809..c99c88d 100644 (file)
@@ -29,10 +29,13 @@ void PageInfoHelper::ProcessEvent(const ui::LocatedEvent& event) {
   WebContents* tab = location_bar_->GetWebContents();
   if (!tab)
     return;
-  const NavigationController& controller = tab->GetController();
+
   // Important to use GetVisibleEntry to match what's showing in the omnibox.
-  NavigationEntry* nav_entry = controller.GetVisibleEntry();
-  DCHECK(nav_entry);
+  NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry();
+  // The visible entry can be NULL in the case of window.open("").
+  if (!nav_entry)
+    return;
+
   location_bar_->delegate()->ShowWebsiteSettings(
       tab, nav_entry->GetURL(), nav_entry->GetSSL());
 }