diff options
Diffstat (limited to 'core/fpdfdoc/cpvt_generateap.cpp')
-rw-r--r-- | core/fpdfdoc/cpvt_generateap.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp index 66abde63a8..93ef9dc366 100644 --- a/core/fpdfdoc/cpvt_generateap.cpp +++ b/core/fpdfdoc/cpvt_generateap.cpp @@ -186,7 +186,8 @@ bool GenerateWidgetAP(CPDF_Document* pDoc, pStreamResFontList->SetReferenceFor(sFontName, pDoc, pFontDict->GetObjNum()); } else { - pStreamDict->SetFor("Resources", pFormDict->GetDictFor("DR")->Clone()); + pStreamDict->SetFor("Resources", + pFormDict->GetDictFor("DR")->Clone().release()); pStreamResList = pStreamDict->GetDictFor("Resources"); } } @@ -437,7 +438,8 @@ bool GenerateWidgetAP(CPDF_Document* pDoc, pStreamResFontList->SetReferenceFor(sFontName, pDoc, pFontDict->GetObjNum()); } else { - pStreamDict->SetFor("Resources", pFormDict->GetDictFor("DR")->Clone()); + pStreamDict->SetFor("Resources", + pFormDict->GetDictFor("DR")->Clone().release()); pStreamResList = pStreamDict->GetDictFor("Resources"); } } |