Platform fix, missing check for jsutil == null
authorBobHanson <hansonr@stolaf.edu>
Sat, 21 Mar 2020 19:04:29 +0000 (14:04 -0500)
committerBobHanson <hansonr@stolaf.edu>
Sat, 21 Mar 2020 19:04:29 +0000 (14:04 -0500)
src/jalview/util/Platform.java

index 3cba2dc..8498e7f 100644 (file)
@@ -597,7 +597,6 @@ public class Platform
   @SuppressWarnings("unused")
   public static void getURLCommandArguments()
   {
-
     if (!isJS())
     {
       return;
@@ -628,12 +627,20 @@ public class Platform
 
   public static void ensureJmol()
   {
+    if (!isJS())
+    {
+      return;
+    }
     jsutil.loadResourceIfClassUnknown("core/core_jvjmol.z.js",
             "org.jmol.viewer.Viewer");
   }
 
   public static void ensureRegex()
   {
+    if (!isJS())
+    {
+      return;
+    }
     jsutil.loadResourceIfClassUnknown("core/core_stevesoft.z.js",
             "com.stevesoft.pat.Regex");
   }