[hackers] [dmenu] fix crash with ctrl-enter as input || Hiltjo Posthuma
commit aa69426670bf0ae480db127ff8d4fc62d6da2593
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Thu Jul 24 19:10:23 2014 +0000
fix crash with ctrl-enter as input
reproduce: ./dmenu; send EOF; press ctrl+enter.
diff --git a/dmenu.c b/dmenu.c
index dd2c128..b56f3a8 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -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] != '
Received on Wed Jul 30 2014 - 21:07:56 CEST
This archive was generated by hypermail 2.3.0
: Wed Jul 30 2014 - 21:12:08 CEST