[libdazzle] properties-group: clear ref on weak notify



commit 253fa69d790ce9800b626532292d9386df32a8b6
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 17 03:00:48 2017 -0700

    properties-group: clear ref on weak notify
    
    If we got a weak notify, it likely happened before our GWeakRef
    returned. But that can still return successfully when getting
    the object, which we don't want. But we can synchronously clear
    it here before that has a chance to call _get().

 src/actions/dzl-properties-group.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/actions/dzl-properties-group.c b/src/actions/dzl-properties-group.c
index dcc5a5c..5e6afd6 100644
--- a/src/actions/dzl-properties-group.c
+++ b/src/actions/dzl-properties-group.c
@@ -543,6 +543,8 @@ dzl_properties_group_weak_notify (gpointer  data,
 
   g_assert (DZL_IS_PROPERTIES_GROUP (self));
 
+  g_weak_ref_set (&self->object_ref, NULL);
+
   dzl_properties_group_notify_all_disabled (self);
 }
 


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