Permalink
Browse files

skip if gallery already disposed

to prevent this.settings.target null pointer exception if gallery already disposed
  • Loading branch information...
1 parent 0fb4575 commit 801360af7a704e9e894e6878953e4c494c75d0f1 @mloginov mloginov committed Sep 27, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/photoswipe.class.js
@@ -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;

0 comments on commit 801360a

Please sign in to comment.