diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-10-31 16:48:06 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-10-31 17:05:03 +0100 |
commit | 6e9c139d4a3b84e368d8f45592189d244fc59e32 (patch) | |
tree | 653431f75677983d5169e400357c845f10e92099 /telepathy-glib/connection-contact-list.c | |
parent | 7fd5cd6f113df88f5282486c86c0491f83b74919 (diff) | |
download | telepathy-glib-6e9c139d4a3b84e368d8f45592189d244fc59e32.tar.gz |
don't call _tp_contacts_to_handles in g_return_if_fail
g_return_if_fail() can be compiled as noop, so we shouldn't rely on it to get
the handles.
Diffstat (limited to 'telepathy-glib/connection-contact-list.c')
-rw-r--r-- | telepathy-glib/connection-contact-list.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/telepathy-glib/connection-contact-list.c b/telepathy-glib/connection-contact-list.c index 532e955ec..daf28a6d4 100644 --- a/telepathy-glib/connection-contact-list.c +++ b/telepathy-glib/connection-contact-list.c @@ -769,10 +769,13 @@ generic_callback (TpConnection *self, G_STMT_START { \ GSimpleAsyncResult *result; \ GArray *handles; \ + gboolean supplied_contacts_are_valid; \ \ g_return_if_fail (TP_IS_CONNECTION (self)); \ - g_return_if_fail (_tp_contacts_to_handles (self, n_contacts, contacts, \ - &handles)); \ + \ + supplied_contacts_are_valid = _tp_contacts_to_handles (self, n_contacts, \ + contacts, &handles); \ + g_return_if_fail (supplied_contacts_are_valid); \ \ result = g_simple_async_result_new ((GObject *) self, callback, user_data, \ tp_connection_##method##_async); \ @@ -1109,11 +1112,14 @@ tp_connection_get_contact_groups (TpConnection *self) G_STMT_START { \ GSimpleAsyncResult *result; \ GArray *handles; \ + gboolean supplied_contacts_are_valid; \ \ g_return_if_fail (TP_IS_CONNECTION (self)); \ g_return_if_fail (group != NULL); \ - g_return_if_fail (_tp_contacts_to_handles (self, n_contacts, contacts, \ - &handles)); \ + \ + supplied_contacts_are_valid = _tp_contacts_to_handles (self, n_contacts, \ + contacts, &handles); \ + g_return_if_fail (supplied_contacts_are_valid); \ \ result = g_simple_async_result_new ((GObject *) self, callback, user_data, \ tp_connection_##method##_async); \ |