diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-08-19 21:03:32 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-08-19 21:03:32 (GMT) |
commit | 708c8951f58b33ac7efc1891df41e4b8ed63311b (patch) | |
tree | bc355475914eff2359d2f1a721f33312d0df3d6c | |
parent | 81c1646a1eb96a6291b18a5a37f87bf6805b6794 (diff) |
Checked for error when reconnecting a signal to the main thread.
-rw-r--r-- | src/glibext/signal.c | 3 |
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; |