text editor patch by antihc3.

fixes 'Memoryblock free: attempt to free NULL pointer' errors.
This commit is contained in:
Stephen Swaney
2005-05-19 03:15:49 +00:00
parent c1936cff60
commit 615c2f40a1

View File

@@ -229,7 +229,7 @@ int reopen_text(Text *text)
for (tmp= text->lines.first; tmp; tmp= tmp->next) {
MEM_freeN(tmp->line);
MEM_freeN(tmp->format);
if (tmp->format) MEM_freeN(tmp->format);
}
BLI_freelistN(&text->lines);
@@ -1846,7 +1846,7 @@ void txt_split_curline (Text *text) {
right[text->curl->len - text->curc]=0;
MEM_freeN(text->curl->line);
MEM_freeN(text->curl->format);
if (text->curl->format) MEM_freeN(text->curl->format);
/* Make the new TextLine */