ee: don't crash when editing zero-byte files.

This commit is contained in:
Dobrazupa.org staff 2013-05-20 14:44:41 -04:00 committed by Pasi Kallinen
parent badc02927e
commit 3f42327d47
1 changed files with 1 additions and 1 deletions

2
ee.c
View File

@ -1925,7 +1925,7 @@ char *file_name;
in_string[length] = 0;
get_line(length, in_string, &append);
}
if ((can_read) && (curr_line->line_length == 1))
if ((can_read) && (curr_line->line_length == 1) && (curr_line->prev_line))
{
temp_line = curr_line->prev_line;
temp_line->next_line = curr_line->next_line;