diff options
Diffstat (limited to 'telepathy-glib/protocol.c')
-rw-r--r-- | telepathy-glib/protocol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c index ee9b7e282..3c7ed9916 100644 --- a/telepathy-glib/protocol.c +++ b/telepathy-glib/protocol.c @@ -192,15 +192,15 @@ tp_protocol_params_from_param_specs (const GPtrArray *parameters, { GValue structure = { 0 }; GValue *tmp; - /* Points to the zeroed entry just after the end of the array - * - but we're about to extend the array to make it valid */ - TpConnectionManagerParam *param = &g_array_index (output, - TpConnectionManagerParam, output->len); + TpConnectionManagerParam *param; g_value_init (&structure, TP_STRUCT_TYPE_PARAM_SPEC); g_value_set_static_boxed (&structure, g_ptr_array_index (parameters, i)); g_array_set_size (output, output->len + 1); + /* point to the new last item */ + param = &g_array_index (output, TpConnectionManagerParam, + output->len - 1); if (!dbus_g_type_struct_get (&structure, 0, ¶m->name, |