[dconf] don't return NULL on empty dconf_engine_list()
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] don't return NULL on empty dconf_engine_list()
- Date: Fri, 28 May 2010 05:08:15 +0000 (UTC)
commit bc8fc387de46380ee5a57d8d877b4ec722eb742b
Author: Ryan Lortie <desrt desrt ca>
Date: Thu May 27 22:23:52 2010 -0400
don't return NULL on empty dconf_engine_list()
the 'dconf' commandline tool assumes it is non-NULL and crashes.
engine/dconf-engine.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index 382dc07..e708890 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -204,6 +204,9 @@ dconf_engine_list (DConfEngine *engine,
gvdb_table_unref (table);
+ if (list == NULL)
+ list = g_new0 (char *, 1);
+
if (length)
*length = g_strv_length (list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]