projects
/
suckless
/
dmenu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c50e43
)
fix crash with ctrl-enter as input
author
Hiltjo Posthuma
<hiltjo@codemadness.org>
Thu, 24 Jul 2014 19:10:23 +0000
(19:10 +0000)
committer
sin
<sin@2f30.org>
Wed, 30 Jul 2014 19:07:47 +0000
(20:07 +0100)
reproduce: ./dmenu; send EOF; press ctrl+enter.
dmenu.c
patch
|
blob
|
history
diff --git
a/dmenu.c
b/dmenu.c
index dd2c128649a9cf0e1f21f536dee0d1149dd7155b..b56f3a899ebdf1ae177ef819d04c3661a69f37cd 100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-370,7
+370,8
@@
keypress(XKeyEvent *ev) {
puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);
if(!(ev->state & ControlMask))
exit(EXIT_SUCCESS);
- sel->out = True;
+ if(sel)
+ sel->out = True;
break;
case XK_Right:
if(text[cursor] != '\0') {