diff --git a/uk/ac/sanger/artemis/components/alignment/BamView.java b/uk/ac/sanger/artemis/components/alignment/BamView.java
index e49f1af9e50b8bf9900644ea89fc5c7dacf9bb44..7c04ed884d92f0ba32cc60cd6ac0ad4a21559674 100644
--- a/uk/ac/sanger/artemis/components/alignment/BamView.java
+++ b/uk/ac/sanger/artemis/components/alignment/BamView.java
@@ -1490,7 +1490,9 @@ public class BamView extends JPanel
       {
         if(colourByStrandTag.isSelected())
         {
-          if( ((Character)samRecord.getAttribute("XS")).equals('+') )
+          if(samRecord.getAttribute("XS") == null)
+            g2.setColor(Color.BLACK); 
+          else if( ((Character)samRecord.getAttribute("XS")).equals('+') )
             g2.setColor(Color.BLUE);
           else if( ((Character)samRecord.getAttribute("XS")).equals('-') )
             g2.setColor(Color.RED);
@@ -1602,7 +1604,9 @@ public class BamView extends JPanel
         {
           if(colourByStrandTag.isSelected())
           {
-            if( ((Character)samRecord.getAttribute("XS")).equals('+') )
+            if(samRecord.getAttribute("XS") == null)
+              g2.setColor(Color.BLACK); 
+            else if( ((Character)samRecord.getAttribute("XS")).equals('+') )
               g2.setColor(Color.BLUE);
             else if( ((Character)samRecord.getAttribute("XS")).equals('-') )
               g2.setColor(Color.RED);