From 5eda2e026654bb7d79c30053f60cc2f67171be75 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 21 Feb 2011 23:02:01 -0600 Subject: When we're being selective we need to ensure we don't unref too boldly. --- libdbusmenu-glib/server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libdbusmenu-glib/server.c') diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index aa39991..de8a9b9 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -892,7 +892,9 @@ menuitem_property_changed (DbusmenuMenuitem * mi, gchar * property, GVariant * v /* If so, we need to swap the value */ if (prop != NULL) { - g_variant_unref(prop->variant); + if (prop->variant != NULL) { + g_variant_unref(prop->variant); + } prop->variant = variant; } else { /* else we need to add it */ -- cgit v1.2.3