diff options
author | Ted Gould <ted@gould.cx> | 2012-02-07 10:29:57 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-02-07 10:29:57 -0600 |
commit | 00fd5940d07b27ccf3385b021145c72c2317e87b (patch) | |
tree | 0de9df811a65189809b77c8a529d3a1db37fccb8 /libdbusmenu-gtk | |
parent | 815d4e6515e6c17da0c130f8a4a351d7d59ebca0 (diff) | |
download | libdbusmenu-00fd5940d07b27ccf3385b021145c72c2317e87b.tar.gz libdbusmenu-00fd5940d07b27ccf3385b021145c72c2317e87b.tar.bz2 libdbusmenu-00fd5940d07b27ccf3385b021145c72c2317e87b.zip |
Don't get the string to check if something is being cleared, use whether the variant is NULL or not
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 7 |
1 files changed, 1 insertions, 6 deletions
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)) { |