diff options
author | Gabriel Millaire <gabriel.millaire@collabora.co.uk> | 2009-10-01 02:17:05 +0800 |
---|---|---|
committer | Gabriel Millaire <gabriel.millaire@collabora.co.uk> | 2009-10-01 02:17:05 +0800 |
commit | 0e914b5142f3ca7c6f283edbbfda986dd570deaa (patch) | |
tree | 4f24127e2f2e9fb78df51fe8855756c174afc170 /libempathy-gtk | |
parent | d7cd12a662172eca0276c8bbe13fc1257e0d0609 (diff) | |
download | gsoc2013-empathy-0e914b5142f3ca7c6f283edbbfda986dd570deaa.tar gsoc2013-empathy-0e914b5142f3ca7c6f283edbbfda986dd570deaa.tar.gz gsoc2013-empathy-0e914b5142f3ca7c6f283edbbfda986dd570deaa.tar.bz2 gsoc2013-empathy-0e914b5142f3ca7c6f283edbbfda986dd570deaa.tar.lz gsoc2013-empathy-0e914b5142f3ca7c6f283edbbfda986dd570deaa.tar.xz gsoc2013-empathy-0e914b5142f3ca7c6f283edbbfda986dd570deaa.tar.zst gsoc2013-empathy-0e914b5142f3ca7c6f283edbbfda986dd570deaa.zip |
Fixed a leak of str
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-chat-text-view.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c index 9df2e35d9..5b0a35680 100644 --- a/libempathy-gtk/empathy-chat-text-view.c +++ b/libempathy-gtk/empathy-chat-text-view.c @@ -1168,8 +1168,6 @@ chat_text_view_copy_clipboard (EmpathyChatView *view) GList *list; gboolean ignore_newlines = FALSE; - str = g_string_new (""); - g_return_if_fail (EMPATHY_IS_CHAT_TEXT_VIEW (view)); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); @@ -1178,6 +1176,8 @@ chat_text_view_copy_clipboard (EmpathyChatView *view) if (!gtk_text_buffer_get_selection_bounds (buffer, &start, &end)) return; + str = g_string_new (""); + for (iter = start; !gtk_text_iter_equal (&iter, &end); gtk_text_iter_forward_char (&iter)) { c = gtk_text_iter_get_char (&iter); if (c == 0xFFFC) { |