From 7fadc8dc33be5781fac68507b08a9e387ddb5761 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 22 Nov 2016 15:52:32 +0000 Subject: [PATCH] JAL-1919 JAL-2177 handle empty pdbentries list correctly --- src/jalview/appletgui/APopupMenu.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index c30fdad..2037ca0 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -892,9 +892,10 @@ public class APopupMenu extends java.awt.PopupMenu implements void addPDB() { - if (seq.getAllPDBEntries() != null) + Vector pdbs = seq.getAllPDBEntries(); + if (pdbs != null&& !pdbs.isEmpty()) { - PDBEntry entry = seq.getAllPDBEntries().firstElement(); + PDBEntry entry = pdbs.firstElement(); if (ap.av.applet.jmolAvailable) { -- 1.7.10.2