Bug 689078 - Error in saving tab value: TypeError: this.parent is null; r=dietrich
authorRaymond Lee <raymond@raysquare.com>
Mon, 26 Sep 2011 10:46:25 +0800
changeset 77674 12daae1947d755f438a9ea060832fe888a907005
parent 77673 a9edf67c89547f37836e69ea744e87ab6708c3e2
child 77675 915ca38990ae9a4e3c5af81dc0089dca497aac68
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersdietrich
bugs689078
milestone9.0a1
Bug 689078 - Error in saving tab value: TypeError: this.parent is null; r=dietrich
browser/base/content/tabview/tabitems.js
--- a/browser/base/content/tabview/tabitems.js
+++ b/browser/base/content/tabview/tabitems.js
@@ -223,17 +223,17 @@ TabItem.prototype = Utils.extend(new Ite
   // Function: getStorageData
   // Get data to be used for persistent storage of this object.
   getStorageData: function TabItem_getStorageData() {
     let data = {
       url: this.tab.linkedBrowser.currentURI.spec,
       groupID: (this.parent ? this.parent.id : 0),
       title: this.tab.label
     };
-    if (this.parent.getActiveTab() == this)
+    if (this.parent && this.parent.getActiveTab() == this)
       data.active = true;
 
     return data;
   },
 
   // ----------
   // Function: save
   // Store persistent for this object.