aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-07 10:29:57 -0600
committerTed Gould <ted@gould.cx>2012-02-07 10:29:57 -0600
commit00fd5940d07b27ccf3385b021145c72c2317e87b (patch)
tree0de9df811a65189809b77c8a529d3a1db37fccb8 /libdbusmenu-gtk
parent815d4e6515e6c17da0c130f8a4a351d7d59ebca0 (diff)
downloadlibdbusmenu-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.c7
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)) {