summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-09-02 12:13:36 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-09-02 12:13:36 -0700
commit1d7dc1baba517bbf862e7d144e121b2ea4ffd33b (patch)
tree8b701fcb0b798a193475ac9aa64b6acdb55b81ef /core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
parent49c41ac846ed685439b3b5ea9c9037bf4bba2365 (diff)
downloadpdfium-1d7dc1baba517bbf862e7d144e121b2ea4ffd33b.tar.xz
Add m_pDocument in CPDF_Color and check if page date has been forced clear
This will prevent using freed pattern object. This is a better solution than https://pdfium.googlesource.com/pdfium/+/1b9c5c4dc41956b8c5ab17b9a882adf8a2513768 and in essence revert that patch BUG=409373 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/522483003
Diffstat (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index c7c1e7a565..bcb8196662 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -8,19 +8,14 @@
#include "pageint.h"
CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix) :
- m_pPatternObj(NULL), m_PatternType(PATTERN_TILING), m_pDocument(NULL), m_pColor(NULL)
+ m_pPatternObj(NULL), m_PatternType(PATTERN_TILING), m_pDocument(NULL)
{
if (pParentMatrix) {
m_ParentMatrix = *pParentMatrix;
}
}
-
CPDF_Pattern::~CPDF_Pattern()
{
- if (m_pColor) {
- m_pColor->SetValue(NULL, NULL, 0);
- m_pColor = NULL;
- }
}
CPDF_TilingPattern::CPDF_TilingPattern(CPDF_Document* pDoc, CPDF_Object* pPatternObj, const CFX_AffineMatrix* parentMatrix) :
CPDF_Pattern(parentMatrix)