Index: core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp |
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp |
index e9f70c14db522728b7b5a7404e05be42d21beb99..9cdf00e717d2d2bb5c7ba62090867a3170dce1ec 100644 |
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp |
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp |
@@ -52,8 +52,7 @@ CPDF_Image* CPDF_Image::Clone() { |
pImage->LoadImageF((CPDF_Stream*)((CPDF_Object*)m_pStream)->Clone(), |
m_bInline); |
if (m_bInline) { |
- CPDF_Dictionary* pInlineDict = (CPDF_Dictionary*)m_pInlineDict->Clone(TRUE); |
- pImage->SetInlineDict(pInlineDict); |
+ pImage->SetInlineDict(ToDictionary(m_pInlineDict->Clone(TRUE))); |
} |
return pImage; |
} |
@@ -86,7 +85,7 @@ FX_BOOL CPDF_Image::LoadImageF(CPDF_Stream* pStream, FX_BOOL bInline) { |
m_bInline = bInline; |
CPDF_Dictionary* pDict = pStream->GetDict(); |
if (m_bInline) { |
- m_pInlineDict = (CPDF_Dictionary*)pDict->Clone(); |
+ m_pInlineDict = ToDictionary(pDict->Clone()); |
} |
m_pOC = pDict->GetDict(FX_BSTRC("OC")); |
m_bIsMask = !pDict->KeyExist(FX_BSTRC("ColorSpace")) || |