diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml index 40c903c5aef..8d6fbd203c9 100644 --- a/toolkit/content/widgets/browser.xml +++ b/toolkit/content/widgets/browser.xml @@ -646,7 +646,8 @@ Components.classes["@mozilla.org/browser/shistory;1"] .createInstance(Components.interfaces.nsISHistory); // enable global history - this.docShell.QueryInterface(Components.interfaces.nsIDocShellHistory).useGlobalHistory = true; + if (this.docShell) + this.docShell.QueryInterface(Components.interfaces.nsIDocShellHistory).useGlobalHistory = true; } } catch (e) {