Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix in dispose method #397

Merged
merged 3 commits into from

2 participants

@mloginov

No description provided.

@mloginov mloginov closed this
@mloginov mloginov reopened this
mloginov added some commits
@mloginov mloginov removed image load handlers on dispose
to prevent exception if gallery disposes and image not loaded yet
0fb4575
@mloginov mloginov skip if gallery already disposed
to prevent this.settings.target null pointer exception if gallery already disposed
801360a
@billinghamj billinghamj merged commit bbdf168 into from
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes errors reported by JSLint during build on Windows introduced in
pull request #351 and #397, and removes unnecessary Windows specific
Thumbs.db files introduced in pull request #276.
ffdf883
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes 4 "errors" introduced in pull request #351 and #397 reported by
JSLint  - errors which causes the build script to fail, and cleans up
unnecessary Windows specific Thumbs.db files first introduced in pull
request #345.
dddba62
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes 4 "errors" introduced in pull request #351 and #397 reported by
JSLint  - errors which causes the build script to fail, and cleans up
unnecessary Windows specific Thumbs.db files first introduced in pull
request #345.
2a112d8
@thorstein5 thorstein5 referenced this pull request from a commit in thorstein5/PhotoSwipe
@thorstein5 thorstein5 Fixes build errors and removes thumbs.db files
Fixes 4 "errors" introduced in pull request #351 and #397 reported by
JSLint  - errors which causes the build script to fail, and cleans up
unnecessary Windows specific Thumbs.db files first introduced in pull
request #345.
d0d276f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 24, 2012
  1. @mloginov
Commits on Sep 27, 2012
  1. @mloginov

    removed image load handlers on dispose

    mloginov authored
    to prevent exception if gallery disposes and image not loaded yet
  2. @mloginov

    skip if gallery already disposed

    mloginov authored
    to prevent this.settings.target null pointer exception if gallery already disposed
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 2 deletions.
  1. +3 −0  src/image.class.js
  2. +4 −2 src/photoswipe.class.js
View
3  src/image.class.js
@@ -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)) {
View
6 src/photoswipe.class.js
@@ -90,6 +90,8 @@
this.carousel.dispose();
}
+ this.destroyZoomPanRotate();
+
if (!Util.isNothing(this.uiLayer)){
this.uiLayer.dispose();
}
@@ -98,8 +100,6 @@
this.toolbar.dispose();
}
- this.destroyZoomPanRotate();
-
if (!Util.isNothing(this.cache)){
this.cache.dispose();
}
@@ -814,6 +814,8 @@
onDocumentOverlayFadeIn: function(e){
window.setTimeout(function(){
+ if (Util.isNothing(this.settings))
+ return;
var el = (this.settings.target === window) ? window.document.body : this.settings.target;
Something went wrong with that request. Please try again.