From fb22f9d8c123c34558e13cf0be68baea7a089364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= Date: Wed, 14 Oct 2015 09:27:07 -0700 Subject: [PATCH] backend: check action is a valid pointer. Fixes 756572 Somehow, poppler_annot_screen_get_action() returns NULL and it was not being checked for POPPLER_ANNOT_SCREEN. --- backend/pdf/ev-poppler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 91b46bd7..f3a65103 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -2924,7 +2924,7 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot, /* Ignore screen annots containing a rendition action */ action = poppler_annot_screen_get_action (POPPLER_ANNOT_SCREEN (poppler_annot)); - if (action->type == POPPLER_ACTION_RENDITION) + if (action && action->type == POPPLER_ACTION_RENDITION) break; } /* Fall through */ @@ -3787,7 +3787,7 @@ pdf_document_media_get_media_mapping (EvDocumentMedia *document_media, PopplerAction *action; action = poppler_annot_screen_get_action (POPPLER_ANNOT_SCREEN (mapping->annot)); - if (action->type == POPPLER_ACTION_RENDITION) { + if (action && action->type == POPPLER_ACTION_RENDITION) { media = ev_media_from_poppler_rendition (EV_DOCUMENT (pdf_document), page, action->rendition.media); }