summaryrefslogtreecommitdiff
path: root/src/glibext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-08-19 21:03:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-08-19 21:03:32 (GMT)
commit708c8951f58b33ac7efc1891df41e4b8ed63311b (patch)
treebc355475914eff2359d2f1a721f33312d0df3d6c /src/glibext
parent81c1646a1eb96a6291b18a5a37f87bf6805b6794 (diff)
Checked for error when reconnecting a signal to the main thread.
Diffstat (limited to 'src/glibext')
-rw-r--r--src/glibext/signal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glibext/signal.c b/src/glibext/signal.c
index 3d7eaa7..33290fb 100644
--- a/src/glibext/signal.c
+++ b/src/glibext/signal.c
@@ -176,10 +176,11 @@ gulong _g_signal_connect_to_main(gpointer instance, const gchar *signal, GCallba
signal_id = g_signal_lookup(signal, G_TYPE_FROM_INSTANCE(instance));
g_signal_query(signal_id, &query);
+ assert(query.signal_id != 0);
/* Allocation adaptée */
- info = (gsignal_wrapper_info *)calloc(1, sizeof(gsignal_wrapper_info) + sizeof(GValue) * (query.n_params + 1));
+ info = calloc(1, sizeof(gsignal_wrapper_info) + sizeof(GValue) * (query.n_params + 1));
info->instance = instance;