From: gmungoc Date: Tue, 22 Nov 2016 15:52:32 +0000 (+0000) Subject: JAL-1919 JAL-2177 handle empty pdbentries list correctly X-Git-Tag: Release_2_10_1~10^2~4^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffeatures%2FJAL-2177_update_jmol_to_14.6.4_2016.10.26;p=jalview.git JAL-1919 JAL-2177 handle empty pdbentries list correctly --- 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) {