From 0d3ebcb5cf74eef75f2153400b7b8a1d450573a5 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Wed, 29 May 2013 14:54:35 -0400 Subject: indicator-ng: fix crash --- libindicator/indicator-ng.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libindicator/indicator-ng.c b/libindicator/indicator-ng.c index fbf1e97..88db31c 100644 --- a/libindicator/indicator-ng.c +++ b/libindicator/indicator-ng.c @@ -256,15 +256,12 @@ indicator_ng_update_entry (IndicatorNg *self) state = g_action_group_get_action_state (self->actions, self->header_action); if (state && g_variant_is_of_type (state, G_VARIANT_TYPE ("(sssb)"))) { - gchar *iconstr = NULL; + const gchar *iconstr = NULL; g_variant_get (state, "(&s&s&sb)", &label, &iconstr, &accessible_desc, &visible); if (iconstr) - { - icon = g_variant_ref_sink (g_variant_new_string (iconstr)); - g_free (iconstr); - } + icon = g_variant_ref_sink (g_variant_new_string (iconstr)); } else if (state && g_variant_is_of_type (state, G_VARIANT_TYPE ("a{sv}"))) { -- cgit v1.2.3