[glib/new-gsettings] Do not crash when binding with no schema
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/new-gsettings] Do not crash when binding with no schema
- Date: Fri, 16 Apr 2010 23:24:01 +0000 (UTC)
commit 41d50f655d7a8790d09da3b4c29719246f3706db
Author: Vincent Untz <vuntz gnome org>
Date: Fri Apr 16 19:23:14 2010 -0400
Do not crash when binding with no schema
There's already a g_critical() call for this later on.
gio/gsettings.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 28476ae..e79841f 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -1613,7 +1613,8 @@ g_settings_bind_with_mapping (GSettings *settings,
value = g_settings_schema_get_value (settings->priv->schema, key, NULL);
binding->type = g_variant_type_copy (g_variant_get_type (value));
- g_variant_unref (value);
+ if (value)
+ g_variant_unref (value);
}
if (binding->type == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]