Fix segfault when dbus is disabled (fixes #397)

This commit is contained in:
Sebastian Ramacher 2024-01-14 16:56:04 +01:00
parent 2aae968ee6
commit 3614a24446

View File

@ -546,6 +546,7 @@ bool cmd_exec(girara_session_t* session, girara_list_t* argument_list) {
return false; return false;
} }
if (zathura->dbus != NULL) {
const char* bus_name = zathura_dbus_get_name(zathura); const char* bus_name = zathura_dbus_get_name(zathura);
for (size_t idx = 0; idx != girara_list_size(argument_list); ++idx) { for (size_t idx = 0; idx != girara_list_size(argument_list); ++idx) {
char* value = girara_list_nth(argument_list, idx); char* value = girara_list_nth(argument_list, idx);
@ -554,6 +555,7 @@ bool cmd_exec(girara_session_t* session, girara_list_t* argument_list) {
girara_list_set_nth(argument_list, idx, s); girara_list_set_nth(argument_list, idx, s);
} }
} }
}
if (zathura->document != NULL) { if (zathura->document != NULL) {
const char* path = zathura_document_get_path(zathura->document); const char* path = zathura_document_get_path(zathura->document);