fixed stacktrace potential for pairwise alignment action.
authorjprocter <Jim Procter>
Mon, 30 May 2005 11:03:27 +0000 (11:03 +0000)
committerjprocter <Jim Procter>
Mon, 30 May 2005 11:03:27 +0000 (11:03 +0000)
src/jalview/gui/AlignFrame.java

index b0eca3e..83ee1c3 100755 (executable)
@@ -1004,7 +1004,8 @@ public class AlignFrame extends GAlignFrame
 
   public void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
   {
-    if(viewport.getSelectionGroup().getSize()<2)
+    if((viewport.getSelectionGroup()==null) ||
+       viewport.getSelectionGroup().getSize()<2)
       JOptionPane.showInternalMessageDialog(this, "You must select at least 2 sequences.", "Invalid Selection", JOptionPane.WARNING_MESSAGE);
     else
     {