house keeping
[jalview.git] / src / jalview / io / BioJsHTMLOutput.java
index 089f50b..73be79f 100644 (file)
@@ -96,7 +96,6 @@ public class BioJsHTMLOutput
             { "HTML files" }, "HTML files");
     jvFileChooser.setFileView(new JalviewFileView());
 
-    // TODO uncomment when supported by MassageManager
     jvFileChooser.setDialogTitle(MessageManager
             .getString("label.save_as_biojs_html"));
     jvFileChooser.setDialogTitle("save as BioJs HTML");
@@ -201,10 +200,13 @@ public class BioJsHTMLOutput
         try
         {
           String gitRepoPkgJson = getURLContentAsString(BJS_TEMPLATE_GIT_REPO);
-          BioJSRepositoryPojo release = new BioJSRepositoryPojo(
-                  gitRepoPkgJson);
-          syncUpdates(BJS_TEMPLATES_LOCAL_DIRECTORY, release);
-          refreshBioJSVersionsInfo(BJS_TEMPLATES_LOCAL_DIRECTORY);
+          if (gitRepoPkgJson != null)
+          {
+            BioJSRepositoryPojo release = new BioJSRepositoryPojo(
+                    gitRepoPkgJson);
+            syncUpdates(BJS_TEMPLATES_LOCAL_DIRECTORY, release);
+            refreshBioJSVersionsInfo(BJS_TEMPLATES_LOCAL_DIRECTORY);
+          }
         } catch (URISyntaxException e)
         {
           e.printStackTrace();