fix crash with ctrl-enter as input
aa694266
reproduce: ./dmenu; send EOF; press ctrl+enter.
1 file(s) · +2 −1
reproduce: ./dmenu; send EOF; press ctrl+enter.
| 370 | 370 | puts((sel && !(ev->state & ShiftMask)) ? sel->text : text); |
|
| 371 | 371 | if(!(ev->state & ControlMask)) |
|
| 372 | 372 | exit(EXIT_SUCCESS); |
|
| 373 | - | sel->out = True; |
|
| 373 | + | if(sel) |
|
| 374 | + | sel->out = True; |
|
| 374 | 375 | break; |
|
| 375 | 376 | case XK_Right: |
|
| 376 | 377 | if(text[cursor] != '\0') { |