[glib] [gsettings] Add g_return_*_if_fail() guards in GSettingsBackend
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] [gsettings] Add g_return_*_if_fail() guards in GSettingsBackend
- Date: Thu, 22 Apr 2010 01:29:27 +0000 (UTC)
commit bf0f8ad8ee800b9a1f76a57684b45f79e2e6e5d8
Author: Javier Jardón <jjardon gnome org>
Date: Thu Apr 22 03:20:17 2010 +0200
[gsettings] Add g_return_*_if_fail() guards in GSettingsBackend
gio/gsettingsbackend.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsettingsbackend.c b/gio/gsettingsbackend.c
index c4db445..7ad048a 100644
--- a/gio/gsettingsbackend.c
+++ b/gio/gsettingsbackend.c
@@ -445,6 +445,8 @@ g_settings_backend_changed_tree (GSettingsBackend *backend,
GetKeysState state = { 0, };
gchar **list;
+ g_return_if_fail (G_IS_SETTINGS_BACKEND (backend));
+
list = g_new (gchar *, g_tree_nnodes (tree) + 1);
state.items = list;
@@ -914,6 +916,7 @@ g_settings_backend_setup (const gchar *context,
GSettingsBackend *backend)
{
g_return_if_fail (context[0] != '\0');
+ g_return_if_fail (G_IS_SETTINGS_BACKEND (backend));
if (g_settings_backends == NULL)
g_settings_backends = g_hash_table_new (g_str_hash, g_str_equal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]