diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js index c2da560722bf..07361f453097 100644 --- a/browser/components/sessionstore/src/nsSessionStore.js +++ b/browser/components/sessionstore/src/nsSessionStore.js @@ -2518,7 +2518,7 @@ SessionStoreService.prototype = { // at startup we don't accidentally add them to a popup window do { total.unshift(lastClosedWindowsCopy.shift()) - } while (total[0].isPopup) + } while (total[0].isPopup && lastClosedWindowsCopy.length > 0) } #endif