comparison src/logwindow.c @ 767:e73d30e0c896

Make utf8_validate_or_convert() to always allocate a new string.
author zas_
date Fri, 30 May 2008 08:36:23 +0000
parents a7289f9e8d29
children 9962b24b6b43
comparison
equal deleted inserted replaced
766:7148e125bf23 767:e73d30e0c896
196 { 196 {
197 gchar *str_utf8; 197 gchar *str_utf8;
198 198
199 if (!text || !*text) return; 199 if (!text || !*text) return;
200 200
201 str_utf8 = utf8_validate_or_convert((gchar *)text); 201 str_utf8 = utf8_validate_or_convert(text);
202 gtk_text_buffer_insert_with_tags_by_name(buffer, iter, str_utf8, -1, tag, NULL); 202 gtk_text_buffer_insert_with_tags_by_name(buffer, iter, str_utf8, -1, tag, NULL);
203 g_free(str_utf8);
203 } 204 }
204 205
205 206
206 void log_window_append(const gchar *str, LogType type) 207 void log_window_append(const gchar *str, LogType type)
207 { 208 {