mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-13 09:13:45 +01:00
Don't try to change document settings if no document is open
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
b5798c899e
commit
c2b35a02fe
@ -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);
|
g_return_if_fail(session->global.data != NULL);
|
||||||
zathura_t* zathura = session->global.data;
|
zathura_t* zathura = session->global.data;
|
||||||
|
|
||||||
|
if (zathura->document == NULL) {
|
||||||
|
/* no document has been openend yet */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int pages_per_row = 1;
|
unsigned int pages_per_row = 1;
|
||||||
girara_setting_get(session, "pages-per-row", &pages_per_row);
|
girara_setting_get(session, "pages-per-row", &pages_per_row);
|
||||||
|
Loading…
Reference in New Issue
Block a user