summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--toolkit/components/passwordmgr/nsLoginManagerPrompter.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
index b66489234..08c1e59e6 100644
--- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
+++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
@@ -1408,9 +1408,11 @@ LoginManagerPrompter.prototype = {
let windows = Services.wm.getEnumerator(null);
while (windows.hasMoreElements()) {
let win = windows.getNext();
- let browser = win.gBrowser.getBrowserForContentWindow(aWindow);
- if (browser) {
- return { win, browser };
+ if (win.gBrowser) {
+ let browser = win.gBrowser.getBrowserForContentWindow(aWindow);
+ if (browser) {
+ return { win, browser };
+ }
}
}
return null;