JAL-4089 - if no centerViewOn commands are given, don’t try to execute!
authorJames Procter <j.procter@dundee.ac.uk>
Tue, 16 May 2023 16:21:58 +0000 (17:21 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Tue, 16 May 2023 16:21:58 +0000 (17:21 +0100)
src/jalview/structures/models/AAStructureBindingModel.java

index 8436b48..9e8f286 100644 (file)
@@ -973,7 +973,10 @@ public abstract class AAStructureBindingModel
       }
       List<StructureCommandI> finalView = commandGenerator
               .centerViewOn(models);
-      executeCommands(finalView, false, "Centered on Superposition");
+      if (finalView!=null && finalView.size()>0)
+      {
+        executeCommands(finalView, false, "Centered on Superposition");
+      }
     }
     return error;
   }