summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mupdf/pdf_annot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mupdf/pdf_annot.c b/mupdf/pdf_annot.c
index 5c142f04..fd1cc796 100644
--- a/mupdf/pdf_annot.c
+++ b/mupdf/pdf_annot.c
@@ -195,10 +195,12 @@ pdf_loadannots(pdf_annot **headp, pdf_xref *xref, fz_obj *annots)
if (fz_isdict(ap))
{
n = fz_dictgets(ap, "N"); /* normal state */
- if (fz_isindirect(n) && !pdf_isstream(xref, fz_tonum(n), fz_togen(n)))
+
+ /* lookup current state in sub-dictionary */
+ if (!pdf_isstream(xref, fz_tonum(n), fz_togen(n)))
n = fz_dictget(n, as);
- if (fz_isindirect(n) && pdf_isstream(xref, fz_tonum(n), fz_togen(n)))
+ if (pdf_isstream(xref, fz_tonum(n), fz_togen(n)))
{
error = pdf_loadxobject(&form, xref, n);
if (error)