commit 68010d931a64b9e6309c0390d231a2895d0d9c9a
parent c661506681077c811e96483cafd93fbf50c1bf77
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 16 Aug 2016 16:56:25 +0200
startup: don't crash when dying early
That is: don't try to look at open files when none are open yet.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nano.c b/src/nano.c
@@ -605,7 +605,7 @@ void die(const char *msg, ...)
#ifndef NANO_TINY
/* If the current buffer has a lockfile, remove it. */
- if (ISSET(LOCKING) && openfile->lock_filename)
+ if (openfile && ISSET(LOCKING) && openfile->lock_filename)
delete_lockfile(openfile->lock_filename);
#endif