Chromium Code Reviews| Index: core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp |
| diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp |
| index bcb81966622b830eb4ff10f6f08dd074e4324c2a..c277735ea9393f511cdda9a3dab83bc264fd33e1 100644 |
| --- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp |
| +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp |
| @@ -13,6 +13,7 @@ CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix) : |
| if (pParentMatrix) { |
| m_ParentMatrix = *pParentMatrix; |
| } |
| + m_bForceClear = FALSE; |
|
Tom Sepez
2014/09/16 19:18:06
nit: I'd move this to the initializer list.
jun_fang
2014/09/16 19:24:38
It should be initialized in the parameter list?
|
| } |
| CPDF_Pattern::~CPDF_Pattern() |
| { |
| @@ -97,7 +98,7 @@ void CPDF_ShadingPattern::Clear() |
| m_pFunctions[i] = NULL; |
| } |
| CPDF_ColorSpace* pCS = m_pCS; |
| - if (pCS && m_pDocument) { |
| + if (!m_bForceClear && pCS && m_pDocument) { |
| m_pDocument->GetPageData()->ReleaseColorSpace(pCS->GetArray()); |
| } |
| m_ShadingType = 0; |