From 2ee54ae6d063bfe311b8fa67bca176a3017ce0e8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 21 Oct 2013 20:13:34 +0100 Subject: [PATCH 04/16] TpBaseProtocol: be a little more tolerant of faulty get_parameters() It doesn't work from Python right now. --- telepathy-glib/base-protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telepathy-glib/base-protocol.c b/telepathy-glib/base-protocol.c index 3f16449..8144326 100644 --- a/telepathy-glib/base-protocol.c +++ b/telepathy-glib/base-protocol.c @@ -1109,7 +1109,7 @@ protocol_properties_getter (GObject *object, const TpCMParamSpec *parameter; for (parameter = tp_base_protocol_get_parameters (self); - parameter->name != NULL; + parameter != NULL && parameter->name != NULL; parameter++) { g_ptr_array_add (ret, _tp_cm_param_spec_to_dbus (parameter)); @@ -1359,7 +1359,7 @@ _tp_cm_param_spec_check_all_allowed (const TpCMParamSpec *parameters, tp_g_hash_table_update (tmp, asv, NULL, NULL); - for (iter = parameters; iter->name != NULL; iter++) + for (iter = parameters; iter != NULL && iter->name != NULL; iter++) { g_hash_table_remove (tmp, iter->name); } -- 1.8.4.rc3