From 3d74a813c50f89a8bc52bdcdb95a2beccb38ed01 Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Mon, 2 Feb 2009 16:05:32 +0000
Subject: [PATCH] fix for remote entry identifiers in a location

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@9749 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 uk/ac/sanger/artemis/io/Location.java | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/uk/ac/sanger/artemis/io/Location.java b/uk/ac/sanger/artemis/io/Location.java
index a65e81781..e3ac9925d 100644
--- a/uk/ac/sanger/artemis/io/Location.java
+++ b/uk/ac/sanger/artemis/io/Location.java
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/Location.java,v 1.7 2005-11-15 14:02:37 tjc Exp $
+ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/Location.java,v 1.8 2009-02-02 16:05:32 tjc Exp $
  */
 
 package uk.ac.sanger.artemis.io;
@@ -34,7 +34,7 @@ import uk.ac.sanger.artemis.io.LocationLexer.TokenEnumeration;
  *  functions for parsing and manipulating the location.
  *
  *  @author Kim Rutherford
- *  @version $Id: Location.java,v 1.7 2005-11-15 14:02:37 tjc Exp $
+ *  @version $Id: Location.java,v 1.8 2009-02-02 16:05:32 tjc Exp $
  *
  */
 public class Location 
@@ -920,13 +920,16 @@ public class Location
 
       Range child_range =  null;
       if(child_node.getType() == LocationParseNode.COMPLEMENT)
-        child_range = child_node.getComplementChild().getRange();
+      {
+      	if(child_node.getComplementChild().getType() == LocationParseNode.RANGE)
+         	child_range = child_node.getComplementChild().getRange();
+      }
       else if(child_node.getType() == LocationParseNode.RANGE)
         child_range = child_node.getRange();
 
       if((child_node.getType() == LocationParseNode.RANGE ||
           child_node.getType() == LocationParseNode.COMPLEMENT) &&
-          child_range.equals(range))
+          (child_range != null && child_range.equals(range)))
       {
         if(child_node.getType() == LocationParseNode.COMPLEMENT)
           return true;
-- 
GitLab