ATOMS: minor GUI fix 85/15685/2
Alessandro Biasci [Wed, 10 Dec 2014 07:35:34 +0000 (08:35 +0100)]
Change-Id: If016ff1f445950ccb9170ba030f98182af9a288c

scilab/modules/atoms/macros/atoms_internals/atomsDownload.sci

index 13e3d8e..df94081 100644 (file)
@@ -106,6 +106,7 @@ function atomsDownload(url_in,file_out,md5sum)
 
     // Build the command
     // =========================================================================
+    winId = [];
 
     if regexp(url_in, "/^(https?|ftp):\/\//", "o") == 1 then
         proxy_host_arg = "";
@@ -258,5 +259,9 @@ function atomsDownload(url_in,file_out,md5sum)
 
     end
 
-    atomsCloseProgressBar(winId);
+    // Close progress bar handle, if not closed yet
+    // =========================================================================
+    if (~isempty(winId))
+        atomsCloseProgressBar(winId);
+    end
 endfunction