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
This commit is contained in:
David Lawrence Ramsey 2004-11-07 01:22:20 +00:00
parent eb5d8383c8
commit 29f446ec40
1 changed files with 1 additions and 1 deletions

View File

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