From: Bram Moolenaar Date: Wed, 4 Aug 2010 10:39:44 +0000 (+0200) Subject: Fix crash when no item in 'path' is used for :find completion. X-Git-Tag: v7.3~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=006d2b036bfa865f1bb6920fb97bda4e412d0080;p=vim Fix crash when no item in 'path' is used for :find completion. --- diff --git a/src/misc1.c b/src/misc1.c index b0f7e91fc..6f197f22b 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -9593,6 +9593,8 @@ expand_in_path(gap, pattern, flags) expand_path_option(curdir, &path_ga); vim_free(curdir); + if (path_ga.ga_len == 0) + return 0; path_list = (char_u **)(path_ga.ga_data); # ifdef WIN3264 if ((file_pattern = alloc((unsigned)MAXPATHL)) == NULL)