From: Carl Worth Date: Wed, 28 Oct 2009 06:57:37 +0000 (-0700) Subject: Fix segfault in case of the database lock not being available. X-Git-Tag: 0.1~674 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=07aa759b68f3198e565385eb23736984bb378d0f;hp=5eaec1e31679d2a1a9ea3b32fb306ad67ee1a936 Fix segfault in case of the database lock not being available. We were nicely reporting the lock-aquisition failure, but then marching along trying to use the database object and just crashing badly. So don't do that. --- diff --git a/database.cc b/database.cc index 5555b0e3..71246eb4 100644 --- a/database.cc +++ b/database.cc @@ -489,6 +489,7 @@ notmuch_database_open (const char *path) } catch (const Xapian::Error &error) { fprintf (stderr, "A Xapian exception occurred: %s\n", error.get_msg().c_str()); + notmuch = NULL; } DONE: