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
(from parent 1:
e0903f3
)
avoid exception if search returns valid object but does not match any sequences
author
jprocter
<Jim Procter>
Wed, 12 Nov 2008 11:09:01 +0000
(11:09 +0000)
committer
jprocter
<Jim Procter>
Wed, 12 Nov 2008 11:09:01 +0000
(11:09 +0000)
src/jalview/analysis/Finder.java
patch
|
blob
|
history
diff --git
a/src/jalview/analysis/Finder.java
b/src/jalview/analysis/Finder.java
index
756897c
..
9f813b5
100644
(file)
--- a/
src/jalview/analysis/Finder.java
+++ b/
src/jalview/analysis/Finder.java
@@
-111,7
+111,7
@@
public class Finder
{
seq = (Sequence) alignment.getSequenceAt(seqIndex);
- if ((selection != null)
+ if ((selection != null && selection.getSize()>0)
&& !selection.getSequences(null).contains(seq))
{
seqIndex++;
@@
-157,7
+157,7
@@
public class Finder
{
resIndex = regex.matchedFrom();
- if ((selection != null)
+ if ((selection != null && selection.getSize()>0)
&& ((resIndex + Integer.parseInt(spaces.elementAt(
resIndex).toString())) < selection.getStartRes()))
{