git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff8a85b
)
JAL-4242 null check on getValue() return
bug/JAL-4242_exception_when_pressing_escape_in_fetch_from_URL_dialog
author
Ben Soares
<b.soares@dundee.ac.uk>
Fri, 18 Aug 2023 09:03:13 +0000
(10:03 +0100)
committer
Ben Soares
<b.soares@dundee.ac.uk>
Fri, 18 Aug 2023 09:03:13 +0000
(10:03 +0100)
src/jalview/gui/JvOptionPane.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/JvOptionPane.java
b/src/jalview/gui/JvOptionPane.java
index
c0efd4a
..
e622445
100644
(file)
--- 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())