aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-27 23:57:37 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-27 23:57:37 -0700
commit07aa759b68f3198e565385eb23736984bb378d0f (patch)
tree1932f457e7b377933f0674ff3fe45055234c0ab0
parent5eaec1e31679d2a1a9ea3b32fb306ad67ee1a936 (diff)
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.
-rw-r--r--database.cc1
1 files changed, 1 insertions, 0 deletions
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: