From c2b35a02fe1ac9fb5909c07133c88bd33432e3ce Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sun, 17 Nov 2013 18:36:22 +0100 Subject: [PATCH] Don't try to change document settings if no document is open Signed-off-by: Sebastian Ramacher --- callbacks.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/callbacks.c b/callbacks.c index cee7731..af6a699 100644 --- a/callbacks.c +++ b/callbacks.c @@ -226,6 +226,10 @@ cb_page_layout_value_changed(girara_session_t* session, const char* UNUSED(name) g_return_if_fail(session->global.data != NULL); zathura_t* zathura = session->global.data; + if (zathura->document == NULL) { + /* no document has been openend yet */ + return; + } unsigned int pages_per_row = 1; girara_setting_get(session, "pages-per-row", &pages_per_row);