- for (int i = 0; i < annotations.length; i++) {
-
- // is this a sensible way of determining type of annotation?
- if (annotations[i].getRNAStruc() != null) {
- annotation = annotations[i];
- break;
- }
+ if (annotations == null)
+ {
+ return;
+ }
+ for (int i = 0; i < annotations.length; i++)
+ {
+
+ // is this a sensible way of determining type of annotation?
+ if (annotations[i].visible && annotations[i].isRNA()
+ && annotations[i].isValidStruc())
+ {
+ annotation = annotations[i];
+ break;
+ }