[gtk+] a11y: Remove weak reference when updating a GtkPopoverAccessible relative-to widget



commit 0e7884f1a7352b05ea8d40c9638e91acb0fa7407
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Mar 21 15:28:36 2014 +0100

    a11y: Remove weak reference when updating a GtkPopoverAccessible relative-to widget
    
    Otherwise the weak reference is left dangling, which later causes issues at the time
    of destroying that widget.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726749

 gtk/a11y/gtkpopoveraccessible.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/gtkpopoveraccessible.c b/gtk/a11y/gtkpopoveraccessible.c
index b726925..55eaaed 100644
--- a/gtk/a11y/gtkpopoveraccessible.c
+++ b/gtk/a11y/gtkpopoveraccessible.c
@@ -49,6 +49,8 @@ popover_update_relative_to (AtkObject  *obj,
 
   if (priv->widget)
     {
+      g_object_remove_weak_pointer (G_OBJECT (priv->widget),
+                                    (gpointer*) &priv->widget);
       widget_accessible = gtk_widget_get_accessible (priv->widget);
       atk_object_remove_relationship (obj,
                                       ATK_RELATION_POPUP_FOR,


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