JAL-1478 Fixed ArrayIndexOutOfBoundsException while performing NW mapping
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 11 Mar 2016 18:03:21 +0000 (18:03 +0000)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 11 Mar 2016 18:03:21 +0000 (18:03 +0000)
src/MCview/PDBChain.java

index 228eede..7fdf11b 100755 (executable)
@@ -147,6 +147,10 @@ public class PDBChain
 
       if (as.astr1.charAt(i) == as.astr2.charAt(i))
       {
+        if (pdbpos >= residues.size())
+        {
+          continue;
+        }
         Residue res = residues.elementAt(pdbpos);
         for (Atom atom : res.atoms)
         {