From 4eb377de610752ddd6f00a23e90729ecd0190587 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Wed, 16 May 2012 19:56:42 -0400 Subject: [PATCH] upkg: Only print object properties if they are non-NULL. It's valid for a property to be unset, so we should not crash in this case. --- src/upkg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/upkg.c b/src/upkg.c index 202876a..9213753 100644 --- a/src/upkg.c +++ b/src/upkg.c @@ -311,8 +311,7 @@ static int object_info(GTypeModule *pkg, unsigned long idx) if (G_VALUE_HOLDS(&val, U_TYPE_OBJECT)) { UObject *obj = g_value_get_object(&val); - /* TODO: Display full object names here. */ - if (obj->pkg_name) { + if (obj && obj->pkg_name) { printf(" %s", obj->pkg_name); } } -- 2.43.0