Bug 616919 - Make "History > Home" work on Mac if no browser windows are open. r=mano a=blocker
authorCameron McCormack <cam@mcc.id.au>
Wed, 02 Feb 2011 15:08:57 +1300
changeset 61833 133443c095646cb8f83ef10f3b67090b9b80c764
parent 61832 a12d11c8912de1d650f8a587376fd03e4561f4db
child 61834 e1d2e090c9a6aa796f2bc4aff97a8e497ee81d4d
push idunknown
push userunknown
push dateunknown
reviewersmano, blocker
bugs616919
milestone2.0b12pre
Bug 616919 - Make "History > Home" work on Mac if no browser windows are open. r=mano a=blocker
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1979,16 +1979,17 @@ function BrowserGoHome(aEvent) {
     return;
 
   var homePage = gHomeButton.getHomePage();
   var where = whereToOpenLink(aEvent, false, true);
   var urls;
 
   // Home page should open in a new tab when current tab is an app tab
   if (where == "current" &&
+      gBrowser &&
       gBrowser.selectedTab.pinned)
     where = "tab";
 
   // openUILinkIn in utilityOverlay.js doesn't handle loading multiple pages
   switch (where) {
   case "current":
     loadOneOrMoreURIs(homePage);
     break;