prevent trying to exec a null char; could potentially happen with a

canceled or empty searchstr.

ok oga@
This commit is contained in:
okan 2008-06-05 04:01:37 +00:00
parent efbfc5fa42
commit 610e8e83ac

2
menu.c
View File

@ -149,7 +149,7 @@ menu_filter(struct menu_q *menuq, char *prompt, char *initial, int dummy,
}
}
out:
if (dummy == 0 && mi->dummy) { /* no match */
if ((dummy == 0 && mi->dummy) || (mi->text[0] == '\0')) { /* no match */
xfree (mi);
mi = NULL;
xu_ptr_ungrab();