gtk+ r21470 - trunk/modules/other/gail



Author: matthiasc
Date: Sun Sep 21 05:33:50 2008
New Revision: 21470
URL: http://svn.gnome.org/viewvc/gtk+?rev=21470&view=rev

Log:
Fix possible leaks of textutils


Modified:
   trunk/modules/other/gail/ChangeLog
   trunk/modules/other/gail/gailbutton.c
   trunk/modules/other/gail/gailtextview.c

Modified: trunk/modules/other/gail/gailbutton.c
==============================================================================
--- trunk/modules/other/gail/gailbutton.c	(original)
+++ trunk/modules/other/gail/gailbutton.c	Sun Sep 21 05:33:50 2008
@@ -392,6 +392,8 @@
 {
   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);

Modified: trunk/modules/other/gail/gailtextview.c
==============================================================================
--- trunk/modules/other/gail/gailtextview.c	(original)
+++ trunk/modules/other/gail/gailtextview.c	Sun Sep 21 05:33:50 2008
@@ -220,6 +220,9 @@
   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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]