summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/config.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c
index ef9a4a7..18e6875 100644
--- a/src/config.c
+++ b/src/config.c
@@ -47,16 +47,20 @@ split_name(const gchar *name, gchar **group, gchar **key)
static void
set_boolean(MqConfig *config, const gchar *name, gboolean value)
{
- gchar *group;
- gchar *key;
+ gchar *group;
+ gchar *key;
+ ConfigItem *item;
split_name(name, &group, &key);
g_key_file_set_boolean(config->key_file, group, name, value);
if (!config->types_and_cbs_set) {
+ item = g_malloc(sizeof(*item));
+ item->type = TYPE_BOOLEAN;
+ item-callbacks = NULL;
g_hash_table_insert(config->types_and_cbs, g_strdup(name),
- TYPE_BOOLEAN);
+ item);
}
}