[libdazzle/libdazzle-3-26] signal-group: be more flexible to re-entrancy



commit f9f37fee007b7bbb8df4e9494cd49d23c0e36203
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 12 14:27:40 2018 -0800

    signal-group: be more flexible to re-entrancy

 src/bindings/dzl-signal-group.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/bindings/dzl-signal-group.c b/src/bindings/dzl-signal-group.c
index d75f702..1beea8f 100644
--- a/src/bindings/dzl-signal-group.c
+++ b/src/bindings/dzl-signal-group.c
@@ -182,7 +182,10 @@ dzl_signal_group_bind_handler (DzlSignalGroup *self,
   g_assert (handler != NULL);
   g_assert (handler->signal_id != 0);
   g_assert (handler->closure != NULL);
-  g_assert (handler->handler_id == 0);
+
+  /* Possibly a re-entrancy issue */
+  if (handler->handler_id != 0)
+    return;
 
   handler->handler_id = g_signal_connect_closure_by_id (self->target,
                                                         handler->signal_id,


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