]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix segfault
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 11 Nov 2019 16:13:56 +0000 (21:43 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 11 Nov 2019 16:13:56 +0000 (21:43 +0530)
src/nnn.c

index ad45dbd06dbc8ee621fa2058bdd804392cd99598..61963c12b4b916e9f80485803565d5e2ce9810d1 100644 (file)
--- 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';