avoid exceptions for orphaned windows
authorjprocter <Jim Procter>
Fri, 18 Feb 2011 17:18:57 +0000 (17:18 +0000)
committerjprocter <Jim Procter>
Fri, 18 Feb 2011 17:18:57 +0000 (17:18 +0000)
src/jalview/gui/PaintRefresher.java

index f974f0a..0a1c9f3 100755 (executable)
@@ -224,7 +224,9 @@ public class PaintRefresher
 
   static AlignmentPanel[] getAssociatedPanels(String id)
   {
+    if (components==null) { return new AlignmentPanel[0]; };
     Vector comps = (Vector) components.get(id);
+    if (comps==null) { return new AlignmentPanel[0]; };
     Vector tmp = new Vector();
     int i, iSize = comps.size();
     for (i = 0; i < iSize; i++)