diff options
author | Ted Gould <ted@gould.cx> | 2011-02-21 23:02:01 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-02-21 23:02:01 -0600 |
commit | 5eda2e026654bb7d79c30053f60cc2f67171be75 (patch) | |
tree | 6737e6006c9d830cf94910b1aea69cb12a860df5 /libdbusmenu-glib/server.c | |
parent | 895343f4aa0c8c0a58e26a7de8c74e49fd9da292 (diff) | |
download | libdbusmenu-5eda2e026654bb7d79c30053f60cc2f67171be75.tar.gz libdbusmenu-5eda2e026654bb7d79c30053f60cc2f67171be75.tar.bz2 libdbusmenu-5eda2e026654bb7d79c30053f60cc2f67171be75.zip |
When we're being selective we need to ensure we don't unref too boldly.
Diffstat (limited to 'libdbusmenu-glib/server.c')
-rw-r--r-- | libdbusmenu-glib/server.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 */ |