diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-04-23 15:02:02 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-04-23 15:02:02 +0100 |
commit | 34806d478e82457d315c336f61f4dad93a4fcf29 (patch) | |
tree | 47d71f4a5d01d45a81a003fb77ccabcd9f5a17d5 | |
parent | 824bdc804414025df5456a0b30bd77d1965878d8 (diff) |
contact: critical if we get an unexpected feature quark
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | 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 8076077d9..57cedecce 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) |