Resolve SIGSEGV in sc_abort

This commit is contained in:
Moritz Lipp 2012-02-08 23:42:09 +01:00
parent 60523c5506
commit 954ace7a76

View File

@ -23,13 +23,15 @@ 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;
for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; ++page_id) { if (zathura->document != NULL) {
zathura_page_t* page = zathura->document->pages[page_id]; for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; ++page_id) {
if (page == NULL) { zathura_page_t* page = zathura->document->pages[page_id];
continue; if (page == NULL) {
} continue;
}
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);