Skip to content

Commit

Permalink
skip if gallery already disposed
Browse files Browse the repository at this point in the history
to prevent this.settings.target null pointer exception if gallery already disposed
  • Loading branch information
mloginov committed Sep 27, 2012
1 parent 0fb4575 commit 801360a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/photoswipe.class.js
Expand Up @@ -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;

Expand Down

0 comments on commit 801360a

Please sign in to comment.