Skip to content

Commit

Permalink
backend: check action is a valid pointer. Fixes 756572
Browse files Browse the repository at this point in the history
Somehow, poppler_annot_screen_get_action() returns NULL and it
was not being checked for POPPLER_ANNOT_SCREEN.
  • Loading branch information
Germán Poo-Caamaño committed Oct 15, 2015
1 parent d7dc267 commit fb22f9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/pdf/ev-poppler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit fb22f9d

Please sign in to comment.