[next] telepathy-glib: contact: critical if we get an unexpected feature quark
Jonny Lamb
jonny at kemper.freedesktop.org
Mon Apr 23 07:02:44 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 34806d478e82457d315c336f61f4dad93a4fcf29
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=34806d478e82457d315c336f61f4dad93a4fcf29
Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date: Mon Apr 23 15:02:02 2012 +0100
contact: critical if we get an unexpected feature quark
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
telepathy-glib/contact.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 8076077..57cedec 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -3515,7 +3515,13 @@ get_feature_flags (const GQuark *features,
g_return_val_if_fail (features != NULL, FALSE);
for (i = 0; features[i] != 0; i++)
- feature_flags |= get_feature (features[i]);
+ {
+ guint f = get_feature (features[i]);
+
+ g_return_val_if_fail (f != 0, FALSE);
+
+ feature_flags |= f;
+ }
/* Force AVATAR_TOKEN if we have AVATAR_DATA */
if ((feature_flags & CONTACT_FEATURE_FLAG_AVATAR_DATA) != 0)
More information about the telepathy-commits
mailing list