git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf4a342
)
JAL-1912 added null check for SequenceMapping variable at the point of reference
author
tcofoegbu
<tcnofoegbu@dundee.ac.uk>
Mon, 5 Oct 2015 16:33:01 +0000
(17:33 +0100)
committer
tcofoegbu
<tcnofoegbu@dundee.ac.uk>
Mon, 5 Oct 2015 16:33:01 +0000
(17:33 +0100)
src/jalview/datamodel/AlignmentAnnotation.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/AlignmentAnnotation.java
b/src/jalview/datamodel/AlignmentAnnotation.java
index
9c3af27
..
01926dc
100755
(executable)
--- a/
src/jalview/datamodel/AlignmentAnnotation.java
+++ b/
src/jalview/datamodel/AlignmentAnnotation.java
@@
-959,8
+959,12
@@
public class AlignmentAnnotation
public void adjustForAlignment()
{
- if (sequenceRef == null || sequenceMapping == null
- || annotations == null)
+ if (sequenceRef == null)
+ {
+ return;
+ }
+
+ if (annotations == null)
{
return;
}
@@
-980,7
+984,7
@@
public class AlignmentAnnotation
for (a = sequenceRef.getStart(); a <= sequenceRef.getEnd(); a++)
{
index = new Integer(a);
- if (sequenceMapping.containsKey(index))
+ if (sequenceMapping != null && sequenceMapping.containsKey(index))
{
position = sequenceRef.findIndex(a) - 1;