diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 4a95077ea..160813fcc 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -86,7 +86,7 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre setTitle(""); parentProgressbar.removeChild(divProgress); - if (gallery) gallery.removeChild(livePreview); + if (gallery && livePreview) gallery.removeChild(livePreview); atEnd(); divProgress = null;