JAL-3976 skip entries with null values when analyzing
authorJim Procter <j.procter@dundee.ac.uk>
Wed, 23 Mar 2022 12:22:41 +0000 (12:22 +0000)
committerJim Procter <j.procter@dundee.ac.uk>
Wed, 23 Mar 2022 12:22:41 +0000 (12:22 +0000)
src/jalview/gui/structurechooser/TDBResultAnalyser.java

index 981fa23..02d4bda 100644 (file)
@@ -131,18 +131,21 @@ public class TDBResultAnalyser
     // ignore anything outside the sequence region
     for (FTSData row : collectedResults)
     {
-      int up_s = (Integer) row.getSummaryData()[idx_ups];
-      int up_e = (Integer) row.getSummaryData()[idx_upe];
-      String provider = (String) row.getSummaryData()[idx_mprov];
-      String mcat = (String) row.getSummaryData()[idx_mcat];
-      // this makes sure all new categories are in the score array.
-      int scorecat = scoreCategory(mcat);
-      if (sourceFilter == null || sourceFilter.equals(provider))
+      if (row.getSummaryData() != null && row.getSummaryData()[idx_ups]!=null)
       {
-        if (seq == row.getSummaryData()[0] && up_e > seq.getStart()
-                && up_s < seq.getEnd())
+        int up_s = (Integer) row.getSummaryData()[idx_ups];
+        int up_e = (Integer) row.getSummaryData()[idx_upe];
+        String provider = (String) row.getSummaryData()[idx_mprov];
+        String mcat = (String) row.getSummaryData()[idx_mcat];
+        // this makes sure all new categories are in the score array.
+        int scorecat = scoreCategory(mcat);
+        if (sourceFilter == null || sourceFilter.equals(provider))
         {
-          filteredResponse.add(row);
+          if (seq == row.getSummaryData()[0] && up_e > seq.getStart()
+                  && up_s < seq.getEnd())
+          {
+            filteredResponse.add(row);
+          }
         }
       }
     }