Fix NPE in spotlight

This commit is contained in:
Joseph Schorr 2014-02-13 17:19:31 -05:00
parent ad76141007
commit f4c217a47b

View file

@ -42,11 +42,13 @@
if (settings.animate) { if (settings.animate) {
currentOverlay.animate({opacity: 0}, settings.speed, settings.easing, function () { currentOverlay.animate({opacity: 0}, settings.speed, settings.easing, function () {
currentOverlay.remove(); if (currentOverlay != null) {
currentOverlay = null; currentOverlay.remove();
currentOverlay = null;
// Trigger the onHide callback // Trigger the onHide callback
settings.onHide.call(this); settings.onHide.call(this);
}
}); });
} else { } else {
currentOverlay.remove(); currentOverlay.remove();