summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-16 15:57:26 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-17 20:06:13 +0000
commita3cf977f974c67bd2cef8dee5b810784bfc21336 (patch)
tree7877cf8df0f5b6a214e870448e8d2df27a280e94 /core/fxge
parentb48912f4f3c428c8b71bbb714faa03cb843d40b0 (diff)
downloadpdfium-a3cf977f974c67bd2cef8dee5b810784bfc21336.tar.xz
CFX_UnownedPtr: check during assignment time as well.
In particular, doing m_pPtr = nullptr; in your dtor to evade this check will not longer work. Fix slight mis-ordering observeds in CFX_Font and CPDFXFA_Context. Change-Id: I3e6137159430333b091364021283a54a13d916b5 Reviewed-on: https://pdfium-review.googlesource.com/5570 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/ge/cfx_font.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fxge/ge/cfx_font.cpp b/core/fxge/ge/cfx_font.cpp
index 18baed9d09..1a45fd3f5b 100644
--- a/core/fxge/ge/cfx_font.cpp
+++ b/core/fxge/ge/cfx_font.cpp
@@ -545,8 +545,9 @@ CFX_FaceCache* CFX_Font::GetFaceCache() const {
void CFX_Font::ClearFaceCache() {
if (!m_FaceCache)
return;
- CFX_GEModule::Get()->GetFontCache()->ReleaseCachedFace(this);
+
m_FaceCache = nullptr;
+ CFX_GEModule::Get()->GetFontCache()->ReleaseCachedFace(this);
}
int CFX_Font::GetULPos() const {