Commit 29f446ec authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment