aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-show.c
diff options
context:
space:
mode:
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index 3b6667c4..95427d4f 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -1081,9 +1081,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
return 1;
}
- notmuch = notmuch_database_open (notmuch_config_get_database_path (config),
- NOTMUCH_DATABASE_MODE_READ_ONLY);
- if (notmuch == NULL)
+ if (notmuch_database_open (notmuch_config_get_database_path (config),
+ NOTMUCH_DATABASE_MODE_READ_ONLY, &notmuch))
return 1;
query = notmuch_query_create (notmuch, query_string);