git://git.nikiroo.be
/
fanfix-jexer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4297b49
)
#25 fix NPE on double-click in secondary thread
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 27 Dec 2017 23:41:34 +0000
(18:41 -0500)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 27 Dec 2017 23:41:34 +0000
(18:41 -0500)
src/jexer/TApplication.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TApplication.java
b/src/jexer/TApplication.java
index ee2e9de86664a04a238070b40637dff35a393176..34f1559007090b31eef65a4d79be9288ed54dec7 100644
(file)
--- a/
src/jexer/TApplication.java
+++ b/
src/jexer/TApplication.java
@@
-1125,8
+1125,14
@@
public class TApplication implements Runnable {
}
secondaryEventReceiver.handleEvent(event);
- if (doubleClick != null) {
- secondaryEventReceiver.handleEvent(doubleClick);
+ // Note that it is possible for secondaryEventReceiver to be null
+ // now, because its handleEvent() might have finished out on the
+ // secondary thread. So put any extra processing inside a null
+ // check.
+ if (secondaryEventReceiver != null) {
+ if (doubleClick != null) {
+ secondaryEventReceiver.handleEvent(doubleClick);
+ }
}
}