1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-22 04:35:58 -04:00

Merge pull request #1281 from ailin-nemui/line-under-construction

fix assertion failure when the line does not have text (yet)
This commit is contained in:
ailin-nemui 2021-03-06 18:37:15 +01:00 committed by GitHub
commit f4e64e488d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,14 +238,15 @@ void textbuffer_line2text(TEXT_BUFFER_REC *buffer, LINE_REC *line, int coloring,
g_string_truncate(str, 0);
ptr = textbuffer_line_get_text(buffer, line);
if (coloring == 0) {
tmp = ptr;
ptr = strip_codes(tmp);
g_free(tmp);
if ((ptr = textbuffer_line_get_text(buffer, line)) != NULL) {
if (coloring == 0) {
tmp = ptr;
ptr = strip_codes(tmp);
g_free(tmp);
}
g_string_append(str, ptr);
g_free(ptr);
}
g_string_append(str, ptr);
g_free(ptr);
}
GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline,