diff options
| author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-07-24 19:10:23 +0000 |
|---|---|---|
| committer | sin <sin@2f30.org> | 2014-07-30 20:07:47 +0100 |
| commit | aa69426670bf0ae480db127ff8d4fc62d6da2593 (patch) | |
| tree | 622e5678736d9cbf2dbe7386f80e340ff223842e | |
| parent | 4c50e43df46e486a0fac632d34eaed37359ceba7 (diff) | |
fix crash with ctrl-enter as input
reproduce: ./dmenu; send EOF; press ctrl+enter.
| -rw-r--r-- | dmenu.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -370,7 +370,8 @@ keypress(XKeyEvent *ev) { | |||
| 370 | puts((sel && !(ev->state & ShiftMask)) ? sel->text : text); | 370 | puts((sel && !(ev->state & ShiftMask)) ? sel->text : text); |
| 371 | if(!(ev->state & ControlMask)) | 371 | if(!(ev->state & ControlMask)) |
| 372 | exit(EXIT_SUCCESS); | 372 | exit(EXIT_SUCCESS); |
| 373 | sel->out = True; | 373 | if(sel) |
| 374 | sel->out = True; | ||
| 374 | break; | 375 | break; |
| 375 | case XK_Right: | 376 | case XK_Right: |
| 376 | if(text[cursor] != '\0') { | 377 | if(text[cursor] != '\0') { |
