Check if there is a database

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2016-02-19 10:03:50 +01:00
parent 334189e961
commit 1c6d31a8b1

View file

@ -190,7 +190,7 @@ list_files_for_cc(zathura_t* zathura, const char* input, bool check_file_ext, in
girara_list_free(names);
}
if (show_recent > 0) {
if (show_recent > 0 && zathura->database != NULL) {
girara_list_t* recent_files = zathura_db_get_recent_files(zathura->database, show_recent);
if (recent_files == NULL) {
goto error_free;