[gnome-builder] egg-signal-group: sink closure before registering



commit c6c747307836db48f79a761002ba640c7fa35bc0
Author: Christian Hergert <christian hergert me>
Date:   Fri May 1 15:32:18 2015 -0700

    egg-signal-group: sink closure before registering
    
    The EggSignalGroup is meant to own the closer, not the connected signal
    handler. This ensures that we maintain a reference between connections.

 contrib/egg/egg-signal-group.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/contrib/egg/egg-signal-group.c b/contrib/egg/egg-signal-group.c
index 6122805..4ec04f8 100644
--- a/contrib/egg/egg-signal-group.c
+++ b/contrib/egg/egg-signal-group.c
@@ -405,6 +405,8 @@ egg_signal_group_connect_object (EggSignalGroup *self,
   else
     closure = g_cclosure_new_object (callback, data);
 
+  g_closure_sink (closure);
+
   handler = g_slice_new0 (SignalHandler);
   handler->detailed_signal = g_intern_string (detailed_signal);
   handler->closure = closure;


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