startup: don't crash when dying early

That is: don't try to look at open files when none are open yet.
master
Benno Schulenberg 2016-08-16 16:56:25 +02:00
parent c661506681
commit 68010d931a
1 changed files with 1 additions and 1 deletions

View File

@ -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