Bug 785015 - Check for this.aus in appUpdater.removeDownloadListener. r=bbondy
authorSzabolcs Hubai <szab.hu@gmail.com>
Wed, 24 Oct 2012 20:39:51 +0200
changeset 111448 8a58f6111c990886d3739eb071c405598caf4156
parent 111447 8d1a935cd822897e7a8d5361b771b88bbbdb7449
child 111449 d8cf15921d0384b32debe19e1eb30f4c7c1e5a41
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbbondy
bugs785015
milestone19.0a1
Bug 785015 - Check for this.aus in appUpdater.removeDownloadListener. r=bbondy
browser/base/content/aboutDialog.js
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -492,17 +492,19 @@ appUpdater.prototype =
     this.downloadStatus = document.getElementById("downloadStatus");
     this.downloadStatus.value =
       DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size);
     this.selectPanel("downloading");
     this.aus.addDownloadListener(this);
   },
 
   removeDownloadListener: function() {
-    this.aus.removeDownloadListener(this);
+    if (this.aus) {
+      this.aus.removeDownloadListener(this);
+    }
   },
 
   /**
    * See nsIRequestObserver.idl
    */
   onStartRequest: function(aRequest, aContext) {
   },