From f48c76a5fec4cbe253351bcdebaca4bcb09d98a5 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 25 Oct 2006 14:57:37 +0000 Subject: [PATCH] Return if negative width, ie alignment deleted --- src/jalview/gui/AlignViewport.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index fb3d4df..f9f32e4 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -280,6 +280,8 @@ public class AlignViewport try { int alWidth = alignment.getWidth(); + if(alWidth<0) + return; Conservation cons = new jalview.analysis.Conservation("All", jalview.schemes.ResidueProperties.propHash, 3, @@ -459,6 +461,8 @@ public class AlignViewport try { int aWidth = alignment.getWidth(); + if(aWidth<0) + return; consensus.annotations = null; consensus.annotations = new Annotation[aWidth]; -- 1.7.10.2