*/
package jalview.structures.models;
-import java.util.Locale;
-
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import javax.swing.SwingUtilities;
@Override
public void updateColours(Object source)
{
+ if (getViewer() == null)
+ {
+ // can happen if a viewer was not instantiated or cleaned up and is still
+ // registered - mostly during tests
+ return;
+ }
AlignmentViewPanel ap = (AlignmentViewPanel) source;
// ignore events from panels not used to colour this view
if (!getViewer().isUsedForColourBy(ap))