From b6a2f88ce5973b80283ce4b9e10c38c40a6205a8 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 10 Apr 2015 12:47:14 +1000 Subject: [PATCH] * imdb-query.c : assert --- src/imdb-query.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/imdb-query.c b/src/imdb-query.c index b9a7bb5..71a9091 100644 --- a/src/imdb-query.c +++ b/src/imdb-query.c @@ -217,6 +217,11 @@ int main(int argc, char **argv) } } + if (db_path == NULL) { + puts("database path not set"); + usage(EXIT_FAILURE); + } + if (imdb_open(&db, db_path, 0) == -1) { printf("database open: %s\n", db.errstr); exit(EXIT_FAILURE);