aboutsummaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authorokan2008-06-05 04:01:37 +0000
committerokan2008-06-05 04:01:37 +0000
commit405a9decabb47a240abe52a8975166df3119b6ac (patch)
treefd883a255c4dd2055dc3313f03eb2e526c5d8404 /menu.c
parentc87b1b8fc894dd9db6b2272d4ce6b309905fdc98 (diff)
downloadcwm-405a9decabb47a240abe52a8975166df3119b6ac.tar.gz
prevent trying to exec a null char; could potentially happen with a
canceled or empty searchstr. ok oga@
Diffstat (limited to '')
-rw-r--r--menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index a98ad58..df870fd 100644
--- a/menu.c
+++ b/menu.c
@@ -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();