summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-07-15 19:53:32 -0400
committerRyan Lortie <desrt@desrt.ca>2012-07-15 19:53:32 -0400
commit0c9bee1cc0963f6c57dc8f7ffe9e86f216f6ac13 (patch)
tree87dc5cb57d67d215073baa868754ebca70e29474 /engine
parent22c41495c77114bde7bb5c1ff50d56b68d38c823 (diff)
downloaddconf-0c9bee1cc0963f6c57dc8f7ffe9e86f216f6ac13.tar.gz
engine: fix dconf_engine_list() with empty db
If we opened an empty database file (like on first login) and did a 'dconf list' on it then we would crash (due to accessing the GVDB without checking for NULL). Add a check.
Diffstat (limited to 'engine')
-rw-r--r--engine/dconf-engine.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index b1c0dd3..89a0c67 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -583,6 +583,9 @@ dconf_engine_list (DConfEngine *engine,
gchar **partial_list;
gint j;
+ if (engine->sources[i]->values == NULL)
+ continue;
+
partial_list = gvdb_table_list (engine->sources[i]->values, dir);
if (partial_list != NULL)