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,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);