--- dmenu_old.c 2015-10-15 17:49:27.521943292 -0400 +++ dmenu.c 2015-10-15 17:49:20.355108883 -0400 @@ -370,7 +370,7 @@ 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') {