[dconf/wip/reorg] dconf_changeset_get: allow NULL value out argument
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf/wip/reorg] dconf_changeset_get: allow NULL value out argument
- Date: Fri, 6 Jul 2012 20:40:07 +0000 (UTC)
commit a20d8fa3133eadf11a3db9d9ad1761e02bb20d41
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Jul 6 16:37:47 2012 -0400
dconf_changeset_get: allow NULL value out argument
We may be interested in only checking the return value for if a key
exists or not.
common/dconf-changeset.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/common/dconf-changeset.c b/common/dconf-changeset.c
index 481a82e..261d4ff 100644
--- a/common/dconf-changeset.c
+++ b/common/dconf-changeset.c
@@ -141,7 +141,9 @@ dconf_changeset_get (DConfChangeset *change,
if (!g_hash_table_lookup_extended (change->table, key, NULL, &tmp))
return FALSE;
- *value = tmp ? g_variant_ref (tmp) : NULL;
+ if (value)
+ *value = tmp ? g_variant_ref (tmp) : NULL;
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]