commit | 2c200030b55faebbea7d7b30aba7ff7c5791b699 | [log] [tgz] |
---|---|---|
author | Tom Sepez <tsepez@chromium.org> | Tue May 30 13:07:20 2017 -0700 |
committer | Chromium commit bot <commit-bot@chromium.org> | Tue May 30 20:22:28 2017 +0000 |
tree | c0c010e554c282b725dfba0b63fd34e986824f1c | |
parent | 0704e9b8772e89290fa262a044ea0f6db4a58641 [diff] |
Fix small ordering issue in CFX_ProgressiveDecoder cleanup. Ensure the renderstatus and image renderers are gone before trying to reset the device. Bug: 726755 Change-Id: Id69402a90aaf6eb03f9e3e7e51ad2f735ddb92d0 Reviewed-on: https://pdfium-review.googlesource.com/6081 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.cpp b/core/fpdfapi/render/cpdf_progressiverenderer.cpp index 4505db6..984ad75 100644 --- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp +++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp
@@ -28,8 +28,10 @@ m_pCurrentLayer(nullptr) {} CPDF_ProgressiveRenderer::~CPDF_ProgressiveRenderer() { - if (m_pRenderStatus) + if (m_pRenderStatus) { + m_pRenderStatus.reset(); // Release first. m_pDevice->RestoreState(false); + } } void CPDF_ProgressiveRenderer::Start(IFX_Pause* pPause) {