From 02e0c8b2d348661265dea7b4531d36aebbeb9c4f Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Mon, 3 Oct 2011 17:28:14 +0200 Subject: [PATCH] Fix a typo --- bookmarks.c | 5 ++++- zathura.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bookmarks.c b/bookmarks.c index 3df9487..202f29d 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -81,8 +81,11 @@ zathura_bookmark_free(zathura_bookmark_t* bookmark) bool zathura_bookmarks_load(zathura_t* zathura, const gchar* file) { - g_return_val_if_fail(zathura && zathura->database, false); + g_return_val_if_fail(zathura, false); g_return_val_if_fail(file, false); + if (zathura->database == NULL) { + return false; + } girara_list_t* bookmarks = zathura_db_load_bookmarks(zathura->database, file); if (!bookmarks) { diff --git a/zathura.c b/zathura.c index 086dbad..610e172 100644 --- a/zathura.c +++ b/zathura.c @@ -204,7 +204,7 @@ zathura_init(int argc, char* argv[]) char* database_path = g_build_filename(zathura->config.data_dir, "bookmarks.sqlite", NULL); zathura->database = zathura_db_init(database_path); if (zathura->database == NULL) { - girara_error("Unable to inizialize database. Bookmarks won't be available."); + girara_error("Unable to initialize database. Bookmarks won't be available."); } g_free(database_path);