From a140461aa560bb000853903787d7e4643858767e Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 2 Mar 2012 00:16:38 -0500 Subject: make proper use of g_variant_builder_init() GVariantBuilder can only infer the proper type for non-empty arrays. If an array may be empty, the full definite type must be given to g_variant_builder_init(). --- src/application-service-appstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 2f456f4..5d4296d 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -1348,7 +1348,7 @@ get_applications (ApplicationServiceAppstore * appstore) GList * listpntr; gint position = 0; - g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY); + g_variant_builder_init(&builder, G_VARIANT_TYPE ("a(sisossssss)")); for (listpntr = priv->applications; listpntr != NULL; listpntr = g_list_next(listpntr)) { Application * app = (Application *)listpntr->data; -- cgit v1.2.3