diff options
author | Gabriel Millaire <millaire.gabriel@gmail.com> | 2009-10-06 10:24:52 +0200 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-10-06 10:29:31 +0200 |
commit | ff1393e672b5e10fd7589a25349188ac6e9bbc73 (patch) | |
tree | 6eb2e1eba48eafc2742c973e5841136a0a708993 | |
parent | 90f62ff1b5f9077482744ec8e218089d07fb8dc2 (diff) |
Removed leak with g_string_free, added comment for 0xFFFC
-rw-r--r-- | libempathy-gtk/empathy-chat-text-view.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c index 5b0a35680..aacc847db 100644 --- a/libempathy-gtk/empathy-chat-text-view.c +++ b/libempathy-gtk/empathy-chat-text-view.c @@ -1180,6 +1180,8 @@ chat_text_view_copy_clipboard (EmpathyChatView *view) for (iter = start; !gtk_text_iter_equal (&iter, &end); gtk_text_iter_forward_char (&iter)) { c = gtk_text_iter_get_char (&iter); + /* 0xFFFC is the 'object replacement' unicode character, + * it indicates the presence of a pixbuf or a widget. */ if (c == 0xFFFC) { ignore_newlines = FALSE; if ((pixbuf = gtk_text_iter_get_pixbuf (&iter))) { @@ -1210,7 +1212,8 @@ chat_text_view_copy_clipboard (EmpathyChatView *view) } } - gtk_clipboard_set_text (clipboard, g_string_free (str, FALSE), str->len); + gtk_clipboard_set_text (clipboard, str->str, str->len); + g_string_free (str, TRUE) } static void |