mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
lib/config: make sure the config map exists when loading defaults
We should not rely on one of the other "_notmuch_config_load_*" functions being called before this one.
This commit is contained in:
parent
63b4c46983
commit
64212c7b91
1 changed files with 3 additions and 0 deletions
|
@ -658,6 +658,9 @@ _notmuch_config_load_defaults (notmuch_database_t *notmuch)
|
|||
{
|
||||
notmuch_config_key_t key;
|
||||
|
||||
if (notmuch->config == NULL)
|
||||
notmuch->config = _notmuch_string_map_create (notmuch);
|
||||
|
||||
for (key = NOTMUCH_CONFIG_FIRST;
|
||||
key < NOTMUCH_CONFIG_LAST;
|
||||
key = notmuch_config_key_t (key + 1)) {
|
||||
|
|
Loading…
Reference in a new issue