diff --git a/modules/other/gail/ChangeLog b/modules/other/gail/ChangeLog index e7a1b7c194..e3c807a9cf 100644 --- a/modules/other/gail/ChangeLog +++ b/modules/other/gail/ChangeLog @@ -1,3 +1,8 @@ +2008-09-20 Matthias Clasen + + * gailtextview.c: + * gailbutton.c: Fix possible leaks of textutils. + 2008-09-19 Matthias Clasen * gailtreeview.c (garbage_collect_cell_data): Actually free diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c index 84aa32d205..5583d56b6f 100644 --- a/modules/other/gail/gailbutton.c +++ b/modules/other/gail/gailbutton.c @@ -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); diff --git a/modules/other/gail/gailtextview.c b/modules/other/gail/gailtextview.c index bd9205cb6a..4e46f7eaae 100644 --- a/modules/other/gail/gailtextview.c +++ b/modules/other/gail/gailtextview.c @@ -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);