diff --git a/application/basilisk/base/content/browser-places.js b/application/basilisk/base/content/browser-places.js index 3ceb635a8b..a330b00399 100644 --- a/application/basilisk/base/content/browser-places.js +++ b/application/basilisk/base/content/browser-places.js @@ -642,8 +642,9 @@ var PlacesCommandHook = { updateBookmarkAllTabsCommand: function PCH_updateBookmarkAllTabsCommand() { // There's nothing to do in non-browser windows. - if (window.location.href != getBrowserURL()) + if (!window.location || window.location.href != getBrowserURL()) { return; + } // Disable "Bookmark All Tabs" if there are less than two // "unique current pages".