git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3253-applet JAL-3383
[jalview.git]
/
src
/
jalview
/
renderer
/
ResidueColourFinder.java
diff --git
a/src/jalview/renderer/ResidueColourFinder.java
b/src/jalview/renderer/ResidueColourFinder.java
index
2da7233
..
2e45117
100644
(file)
--- a/
src/jalview/renderer/ResidueColourFinder.java
+++ b/
src/jalview/renderer/ResidueColourFinder.java
@@
-116,12
+116,13
@@
public class ResidueColourFinder
public SequenceGroup getCurrentSequenceGroup(SequenceGroup[] allGroups,
int res)
{
public SequenceGroup getCurrentSequenceGroup(SequenceGroup[] allGroups,
int res)
{
- if (allGroups == null)
+ int n;
+ if (allGroups == null || (n = allGroups.length) == 0)
{
return null;
}
{
return null;
}
- for (int i = 0; i < allGroups.length; i++)
+ for (int i = 0; i < n; i++)
{
if ((allGroups[i].getStartRes() <= res)
&& (allGroups[i].getEndRes() >= res))
{
if ((allGroups[i].getStartRes() <= res)
&& (allGroups[i].getEndRes() >= res))