diff options
| author | David Bremner <david@tethera.net> | 2021-12-25 09:33:04 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-01-15 15:59:27 -0400 |
| commit | 64212c7b91cdb7e65a2a28f994f8d060a50ae78c (patch) | |
| tree | 40bc4989be3f85324c561eec31c117bb911c9af5 /lib | |
| parent | 63b4c469835133ac44b7db516fc54b8a4abb90a8 (diff) | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/config.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/config.cc b/lib/config.cc index 7a2882de..8f6ef110 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -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)) { |
