[Commits] r2241 - extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux

commits at geoext.org commits at geoext.org
Fri Jul 16 19:34:24 CEST 2010


Author: tschaub
Date: 2010-07-16 19:34:24 +0200 (Fri, 16 Jul 2010)
New Revision: 2241

Modified:
   extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
Log:
If the PrintPreview is not yet rendered, it doesn't have a busyMask.  The beforeDestroy method may get called before render.

Modified: extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
===================================================================
--- extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js	2010-07-16 15:06:00 UTC (rev 2240)
+++ extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js	2010-07-16 17:34:24 UTC (rev 2241)
@@ -391,8 +391,10 @@
     /** private: method[beforeDestroy]
      */
     beforeDestroy: function() {
-        this.printProvider.un("beforeprint", this.busyMask.show, this.busyMask);
-        this.printProvider.un("print", this.busyMask.hide, this.busyMask);
+        if (this.busyMask) {
+            this.printProvider.un("beforeprint", this.busyMask.show, this.busyMask);
+            this.printProvider.un("print", this.busyMask.hide, this.busyMask);
+        }
         this.printMapPanel.un("resize", this.updateSize, this);
         GeoExt.ux.PrintPreview.superclass.beforeDestroy.apply(this, arguments);
     }



More information about the Commits mailing list