Don't crash if last line is not indented

master
Yevgen Muntyan 2006-04-11 13:35:51 -05:00
parent c2459f2077
commit 1de364bbd1
1 changed files with 4 additions and 1 deletions

View File

@ -468,9 +468,12 @@ parse_lines (char **lines,
} }
g_assert (item != NULL); g_assert (item != NULL);
start = content_start; start = content_start;
if (line_is_indented (lines[start]) && !line_is_blank (lines[start])) if (start < n_lines &&
line_is_indented (lines[start]) &&
!line_is_blank (lines[start]))
{ {
while (start < n_lines) while (start < n_lines)
{ {