From 29f446ec40c604655b5607d1f6e1224b66436d73 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sun, 7 Nov 2004 01:22:20 +0000 Subject: [PATCH] don't let remove_magicline() remove the magicline if it's the only line in the file git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2077 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 71de9b1d..2501568d 100644 --- a/src/utils.c +++ b/src/utils.c @@ -444,7 +444,7 @@ void new_magicline(void) /* Remove the magicline from filebot, if there is one. */ void remove_magicline(void) { - if (filebot->data[0] == '\0') { + if (filebot->data[0] == '\0' && filebot->prev != NULL) { filebot = filebot->prev; free_filestruct(filebot->next); filebot->next = NULL; -- 2.39.5