X-Git-Url: https://git.xinqibao.xyz/dmenu.git/blobdiff_plain/13f787306f46a5f838987e3b546d85d1bb1c3c01..aa69426670bf0ae480db127ff8d4fc62d6da2593:/dmenu.c diff --git a/dmenu.c b/dmenu.c index 8d9bbb6..b56f3a8 100644 --- a/dmenu.c +++ b/dmenu.c @@ -69,7 +69,7 @@ main(int argc, char *argv[]) { for(i = 1; i < argc; i++) /* these options take no arguments */ if(!strcmp(argv[i], "-v")) { /* prints version information */ - puts("dmenu-"VERSION", © 2006-2012 dmenu engineers, see LICENSE for details"); + puts("dmenu-"VERSION", © 2006-2014 dmenu engineers, see LICENSE for details"); exit(EXIT_SUCCESS); } else if(!strcmp(argv[i], "-b")) /* appears at the bottom of the screen */ @@ -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') {