JAL-2422 correct ChimeraX save/open session commands; check for null
[jalview.git] / src / jalview / structures / models / AAStructureBindingModel.java
index 870a761..dcd6da8 100644 (file)
@@ -1245,6 +1245,10 @@ public abstract class AAStructureBindingModel
   {
     AlignmentViewPanel ap = (avp == null) ? getViewer().getAlignmentPanel()
             : avp;
+    if (ap == null)
+    {
+      return null;
+    }
     return ap.getAlignViewport().isShowSequenceFeatures()
             ? ap.getFeatureRenderer()
             : null;