Index: fpdfsdk/src/fpdf_transformpage.cpp |
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp |
index cdc646ae7e140a9559b1d721fb6dbe9f733db187..1e24b68f08b7e30feff504a9d70d68489b0fc11c 100644 |
--- a/fpdfsdk/src/fpdf_transformpage.cpp |
+++ b/fpdfsdk/src/fpdf_transformpage.cpp |
@@ -166,8 +166,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, |
CPDF_Object* pObj = pPattenDict->GetNextElement(pos, key); |
if (pObj->GetType() == PDFOBJ_REFERENCE) |
pObj = pObj->GetDirect(); |
- if (pObj->GetType() == PDFOBJ_DICTIONARY) { |
- pDict = (CPDF_Dictionary*)pObj; |
+ if (pObj->IsDictionary()) { |
+ pDict = pObj->AsDictionary(); |
} else if (pObj->GetType() == PDFOBJ_STREAM) { |
pDict = ((CPDF_Stream*)pObj)->GetDict(); |
} else |