Fix possible leaks of textutils

svn path=/trunk/; revision=21470
This commit is contained in:
Matthias Clasen 2008-09-21 05:33:50 +00:00
parent 50d7cf9db4
commit 493cc9b2da
3 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-09-20 Matthias Clasen <mclasen@redhat.com>
* gailtextview.c:
* gailbutton.c: Fix possible leaks of textutils.
2008-09-19 Matthias Clasen <mclasen@redhat.com>
* gailtreeview.c (garbage_collect_cell_data): Actually free

View File

@ -392,6 +392,8 @@ gail_button_init_textutil (GailButton *button,
{
const gchar *label_text;
if (button->textutil)
g_object_unref (button->textutil);
button->textutil = gail_text_util_new ();
label_text = gtk_label_get_text (GTK_LABEL (label));
gail_text_util_text_setup (button->textutil, label_text);

View File

@ -220,6 +220,9 @@ setup_buffer (GtkTextView *view,
if (buffer == NULL)
return;
if (gail_view->textutil)
g_object_unref (gail_view->textutil);
gail_view->textutil = gail_text_util_new ();
gail_text_util_buffer_setup (gail_view->textutil, buffer);