[poppler] poppler/Gfx.cc poppler/OutputDev.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 11 15:11:11 UTC 2021


 poppler/Gfx.cc      |    5 +++--
 poppler/OutputDev.h |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 3c265bb77f17abaf6031e09cb96833e5b3d128b8
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Oct 11 07:04:36 2021 +1030

    Form is not always a ref

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 27ac3173..12b8ecd7 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -4120,9 +4120,10 @@ void Gfx::opXObject(Object args[], int numArgs)
             if (out->useDrawForm() && refObj.isRef()) {
                 out->drawForm(refObj.getRef());
             } else {
-                out->beginForm(refObj.getRef());
+                Ref ref = refObj.isRef() ? refObj.getRef() : Ref::INVALID();
+                out->beginForm(ref);
                 doForm(&obj1);
-                out->endForm(refObj.getRef());
+                out->endForm(ref);
             }
         }
         if (refObj.isRef() && shouldDoForm) {
diff --git a/poppler/OutputDev.h b/poppler/OutputDev.h
index 505891bf..67c21618 100644
--- a/poppler/OutputDev.h
+++ b/poppler/OutputDev.h
@@ -320,8 +320,8 @@ public:
     virtual void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) { }
 
     //----- form XObjects
-    virtual void drawForm(Ref /*id*/) { }
     virtual void beginForm(Ref /*id*/) { }
+    virtual void drawForm(Ref /*id*/) { }
     virtual void endForm(Ref /*id*/) { }
 
     //----- PostScript XObjects


More information about the poppler mailing list