input: avoid crashing when resizing the window during verbatim input
This fixes https://savannah.gnu.org/bugs/?50872.master
parent
d6313c2f8c
commit
ca6d7b6a46
|
@ -1463,7 +1463,8 @@ int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len)
|
||||||
retval = parse_verbatim_kbinput(win, kbinput_len);
|
retval = parse_verbatim_kbinput(win, kbinput_len);
|
||||||
|
|
||||||
/* If the code is invalid in the current mode, discard it. */
|
/* If the code is invalid in the current mode, discard it. */
|
||||||
if ((*retval == '\n' && as_an_at) || (*retval == '\0' && !as_an_at)) {
|
if (retval != NULL && ((*retval == '\n' && as_an_at) ||
|
||||||
|
(*retval == '\0' && !as_an_at))) {
|
||||||
*kbinput_len = 0;
|
*kbinput_len = 0;
|
||||||
beep();
|
beep();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue