From 00fd5940d07b27ccf3385b021145c72c2317e87b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 7 Feb 2012 10:29:57 -0600 Subject: Don't get the string to check if something is being cleared, use whether the variant is NULL or not --- libdbusmenu-gtk/client.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libdbusmenu-gtk') diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 9888cbe..38f2283 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -1128,12 +1128,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, GVariant return; } - const gchar * value = NULL; - if (variant != NULL) { - value = g_variant_get_string(variant, NULL); - } - - if (value == NULL || value[0] == '\0') { + if (variant == NULL) { /* This means that we're unsetting a value. */ /* Try to use the other one */ if (g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON_NAME)) { -- cgit v1.2.3