From: Ben Soares Date: Fri, 18 Aug 2023 09:03:13 +0000 (+0100) Subject: JAL-4242 null check on getValue() return X-Git-Tag: Release_2_11_3_0~8^2~49^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=49c595b1a5d841a27e6c01367da99d278152b976;p=jalview.git JAL-4242 null check on getValue() return --- diff --git a/src/jalview/gui/JvOptionPane.java b/src/jalview/gui/JvOptionPane.java index c0efd4a..e622445 100644 --- a/src/jalview/gui/JvOptionPane.java +++ b/src/jalview/gui/JvOptionPane.java @@ -1129,7 +1129,13 @@ public class JvOptionPane extends JOptionPane private void internalDialogHandleResponse() { - String responseString = (String) this.getValue(); + Object value = this.getValue(); + if (value == null + || (value instanceof Integer && (Integer) value == -1)) + { + return; + } + String responseString = value.toString(); int response = ourOptions.indexOf(responseString); if (!Platform.isJS())