From fa4c37f2304e304d53eeabe23713fea082839915 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Mon, 11 Nov 2019 21:43:56 +0530 Subject: [PATCH] Fix segfault --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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';