Permalink
Browse files

removed image load handlers on dispose

to prevent exception if gallery disposes and image not loaded yet
  • Loading branch information...
mloginov
mloginov committed Sep 27, 2012
1 parent 300327c commit 0fb4575e6a773c8abcb9e62b0e905ceb80bc2656
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/image.class.js
View
@@ -32,6 +32,9 @@
var prop, i;
this.shrinkImage();
+
+ if (!Util.isNothing(this.imageEl))
+ this.imageEl.onload = null;
for (prop in this) {
if (Util.objectHasProperty(this, prop)) {

0 comments on commit 0fb4575

Please sign in to comment.