summaryrefslogtreecommitdiffstats
path: root/smenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'smenu.c')
-rw-r--r--smenu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/smenu.c b/smenu.c
index afd69e6..7efad2c 100644
--- a/smenu.c
+++ b/smenu.c
@@ -7652,8 +7652,9 @@ main(int argc, char * argv[])
char * tmp = xmalloc(strlen(word->str) + 4 + menu_index_data.length);
int * word_pos = malloc(sizeof(int));
- if (!!regexec(&menu_pattern_re, word->str, (size_t)0, NULL, 0)
- == (menu_index_data.expression == 'm' ? 0 : 1))
+ if (!isempty(word->str)
+ && !!regexec(&menu_pattern_re, word->str, (size_t)0, NULL, 0)
+ == (menu_index_data.expression == 'm' ? 0 : 1))
{
*word_pos = wi;