fail on empty text

reported by @dwfreed
This commit is contained in:
Ailin Nemui 2021-04-07 11:46:24 +02:00
parent 42110b92e9
commit dee0554731

View File

@ -452,6 +452,7 @@ void textbuffer_line2text(LINE_REC *line, int coloring, GString *str)
g_string_truncate(str, 0);
g_return_if_fail(line->text != NULL);
for (ptr = line->text;;) {
if (*ptr != 0) {
g_string_append_c(str, (char) *ptr);