We should not rely on one of the other "_notmuch_config_load_*"
functions being called before this one.
---
 lib/config.cc | 3 +++
 1 file changed, 3 insertions(+)

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)) {
-- 
2.34.1

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to