Index: core/fpdfdoc/cpvt_generateap.cpp |
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp |
index 66abde63a869c9251c857c94e1fe1086ed733d8e..93ef9dc3660fcf3b1790fd5e358ae9c605c36dcf 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"); |
} |
} |