From 49f21ae0139e54c0c8467ee439269f720f62c9bb Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 11 Jun 2022 06:05:57 +0530 Subject: [PATCH] Fix segfault when last dir is not set --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nnn.c b/src/nnn.c index 0a291251..fddcf153 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -7143,7 +7143,7 @@ nochange: } if (strcmp(path, newpath) == 0) { - if (bookmark) + if (bookmark || !*lastdir) break; dir = lastdir; /* Go to last dir on bookmark key repeat */