JAL-1919 JAL-2177 handle empty pdbentries list correctly features/JAL-2177_update_jmol_to_14.6.4_2016.10.26
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 22 Nov 2016 15:52:32 +0000 (15:52 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 22 Nov 2016 15:52:32 +0000 (15:52 +0000)
src/jalview/appletgui/APopupMenu.java

index c30fdad..2037ca0 100644 (file)
@@ -892,9 +892,10 @@ public class APopupMenu extends java.awt.PopupMenu implements
 
   void addPDB()
   {
-    if (seq.getAllPDBEntries() != null)
+    Vector<PDBEntry> pdbs = seq.getAllPDBEntries();
+    if (pdbs != null&& !pdbs.isEmpty())
     {
-      PDBEntry entry = seq.getAllPDBEntries().firstElement();
+      PDBEntry entry = pdbs.firstElement();
 
       if (ap.av.applet.jmolAvailable)
       {