mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-16 18:15:40 +01:00
Resolve SIGSEGV in sc_abort
This commit is contained in:
parent
60523c5506
commit
954ace7a76
1 changed files with 8 additions and 6 deletions
|
@ -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);
|
||||
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) {
|
||||
zathura_page_t* page = zathura->document->pages[page_id];
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
girara_mode_set(session, session->modes.normal);
|
||||
girara_sc_abort(session, NULL, NULL, 0);
|
||||
|
|
Loading…
Reference in a new issue