summaryrefslogtreecommitdiff
path: root/xfconf
diff options
context:
space:
mode:
authorAli Abdallah <aliovx@gmail.com>2016-04-25 11:38:20 +0200
committerAli Abdallah <aliovx@gmail.com>2016-04-25 11:38:20 +0200
commit207b47ca8e7523c2fc598829740141d8c0a53be6 (patch)
treeb15f7c78f1e3bf3b9607338a9e5a37a790c32103 /xfconf
parentaff57914922e81bfd5da4bd1bfad3234fa11713a (diff)
downloadxfconf-207b47ca8e7523c2fc598829740141d8c0a53be6.tar.gz
Avoid crash on get_all properties when error occurs.
Diffstat (limited to 'xfconf')
-rw-r--r--xfconf/xfconf-channel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xfconf/xfconf-channel.c b/xfconf/xfconf-channel.c
index 09404e2..ca02518 100644
--- a/xfconf/xfconf-channel.c
+++ b/xfconf/xfconf-channel.c
@@ -763,11 +763,13 @@ xfconf_channel_get_properties(XfconfChannel *channel,
&variant, NULL, ERROR))
{
ERROR_CHECK;
- properties = NULL;
+ variant = NULL;
+ }
+
+ if (variant) {
+ properties = xfconf_gvariant_to_hash (variant);
+ g_variant_unref (variant);
}
-
- properties = xfconf_gvariant_to_hash (variant);
- g_variant_unref (variant);
if(real_property_base != property_base
&& real_property_base != channel->property_base)