summaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index dd2c128..b56f3a8 100644
--- 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') {