From: Arun Prakash Jana Date: Mon, 11 Nov 2019 16:13:56 +0000 (+0530) Subject: Fix segfault X-Git-Tag: v2.8~97 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fa4c37f2304e304d53eeabe23713fea082839915;p=nnn.git Fix segfault --- diff --git a/src/nnn.c b/src/nnn.c index ad45dbd0..61963c12 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3407,7 +3407,7 @@ static bool run_selected_plugin(char **path, const char *file, char *newpath, ch mkpath(*path, file, newpath); /* Copy to path so we can return back to earlier dir */ xstrlcpy(*path, rundir, PATH_MAX); - if (runfile[0]) { + if (runfile && runfile[0]) { xstrlcpy(*lastname, runfile, NAME_MAX); spawn(newpath, *lastname, *path, *path, F_NORMAL); runfile[0] = '\0';