diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-12-15 11:34:13 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-12-16 11:12:56 +0000 |
commit | f9bd5f8328d02c905f45a2ee8489fd68ee2a8454 (patch) | |
tree | 587aaff9cef2e0d910abfe4b063229847e7a4b20 /telepathy-glib/util.c | |
parent | 19d92d41bd371b833c08c3f474456944ee544018 (diff) | |
download | telepathy-glib-f9bd5f8328d02c905f45a2ee8489fd68ee2a8454.tar.gz |
fd.o #32411: tp_g_signal_connect_object: fail if unsupported flags are used
If more flags are added and we don't support them, that's likely to cause
silent bugs. We should at least turn them into loud, obvious bugs.
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32411
Diffstat (limited to 'telepathy-glib/util.c')
-rw-r--r-- | telepathy-glib/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c index ad516df05..63ac10f36 100644 --- a/telepathy-glib/util.c +++ b/telepathy-glib/util.c @@ -993,6 +993,8 @@ tp_g_signal_connect_object (gpointer instance, g_return_val_if_fail (detailed_signal != NULL, 0); g_return_val_if_fail (c_handler != NULL, 0); g_return_val_if_fail (G_IS_OBJECT (gobject), 0); + g_return_val_if_fail ( + (connect_flags & ~(G_CONNECT_AFTER|G_CONNECT_SWAPPED)) == 0, 0); if (connect_flags & G_CONNECT_SWAPPED) ctx->closure = g_cclosure_new_object_swap (c_handler, gobject); |