javadoc
[jalview.git] / src / jalview / gui / UserDefinedColours.java
index ca1ebf4..17682c9 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -373,12 +373,14 @@ public class UserDefinedColours extends GUserDefinedColours implements
       caseSensitiveButtons.addElement(button);
 
       col = Color.white;
-
-      try
-      {
-        col = oldColourScheme.findColour(aa.charAt(0), -1);
-      } catch (Exception ex)
+      if (oldColourScheme!=null)
       {
+        try
+        {
+          col = oldColourScheme.findColour(aa.charAt(0), -1);
+        } catch (Exception ex)
+        {
+        }
       }
     }