X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fopen.cc;h=ba32c2f16d84d9d19c5bdcf1e5ad58db76d411d7;hb=e7bb7919a2484e12cd5a672eaa21b695b7464acf;hp=6fa00a843b9201d5bdf56dd15b3139e7e5adb8ec;hpb=2ba50b52302dce08068843e0029f9ee935a0d7f3;p=notmuch diff --git a/lib/open.cc b/lib/open.cc index 6fa00a84..ba32c2f1 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -871,6 +871,13 @@ notmuch_database_load_config (const char *database_path, if (status_string) *status_string = message; + if (status && + status != NOTMUCH_STATUS_NO_DATABASE + && status != NOTMUCH_STATUS_NO_CONFIG) { + notmuch_database_destroy (notmuch); + notmuch = NULL; + } + if (database) *database = notmuch;