Skip to content

Commit

Permalink
Check that a gBrowser actually has a selectedBrowser
Browse files Browse the repository at this point in the history
Came up in prelim. of 0.1.12
  • Loading branch information
nmaier committed Jul 15, 2014
1 parent de365fa commit cb9f54c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extension/components/scriptish.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ ScriptishService.prototype = {

let currentInnerWindowID = getInnerId(safeWin);
// if the focused tab's window is the one loading, then attach menuCommander
if (safeWin === gBrowser.selectedBrowser.contentWindow) {
if (gBrowser && gBrowser.selectedBrowser &&
safeWin === gBrowser.selectedBrowser.contentWindow) {
if (gmBrowserUI.currentMenuCommander)
gmBrowserUI.currentMenuCommander.detach();

Expand Down

0 comments on commit cb9f54c

Please sign in to comment.