diff options
Diffstat (limited to 'core/fpdfapi/page/cpdf_shadingpattern.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_shadingpattern.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.cpp b/core/fpdfapi/page/cpdf_shadingpattern.cpp index 76f201f767..52f4e1e10a 100644 --- a/core/fpdfapi/page/cpdf_shadingpattern.cpp +++ b/core/fpdfapi/page/cpdf_shadingpattern.cpp @@ -63,15 +63,15 @@ bool CPDF_ShadingPattern::Load() { if (m_ShadingType != kInvalidShading) return true; - CPDF_Dictionary* pShadingDict = + const CPDF_Dictionary* pShadingDict = m_pShadingObj ? m_pShadingObj->GetDict() : nullptr; if (!pShadingDict) return false; m_pFunctions.clear(); - CPDF_Object* pFunc = pShadingDict->GetDirectObjectFor("Function"); + const CPDF_Object* pFunc = pShadingDict->GetDirectObjectFor("Function"); if (pFunc) { - if (CPDF_Array* pArray = pFunc->AsArray()) { + if (const CPDF_Array* pArray = pFunc->AsArray()) { m_pFunctions.resize(std::min<size_t>(pArray->GetCount(), 4)); for (size_t i = 0; i < m_pFunctions.size(); ++i) m_pFunctions[i] = CPDF_Function::Load(pArray->GetDirectObjectAt(i)); |