mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 00:43:45 +01:00
Resolve SIGSEGV in sc_abort
This commit is contained in:
parent
60523c5506
commit
954ace7a76
@ -23,6 +23,7 @@ sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument),
|
|||||||
g_return_val_if_fail(session->global.data != NULL, false);
|
g_return_val_if_fail(session->global.data != NULL, false);
|
||||||
zathura_t* zathura = session->global.data;
|
zathura_t* zathura = session->global.data;
|
||||||
|
|
||||||
|
if (zathura->document != NULL) {
|
||||||
for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; ++page_id) {
|
for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; ++page_id) {
|
||||||
zathura_page_t* page = zathura->document->pages[page_id];
|
zathura_page_t* page = zathura->document->pages[page_id];
|
||||||
if (page == NULL) {
|
if (page == NULL) {
|
||||||
@ -31,6 +32,7 @@ sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument),
|
|||||||
|
|
||||||
g_object_set(page->drawing_area, "draw-links", FALSE, NULL);
|
g_object_set(page->drawing_area, "draw-links", FALSE, NULL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
girara_mode_set(session, session->modes.normal);
|
girara_mode_set(session, session->modes.normal);
|
||||||
girara_sc_abort(session, NULL, NULL, 0);
|
girara_sc_abort(session, NULL, NULL, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user