From 2c200030b55faebbea7d7b30aba7ff7c5791b699 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 30 May 2017 13:07:20 -0700 Subject: 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 Commit-Queue: Tom Sepez --- core/fpdfapi/render/cpdf_progressiverenderer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.cpp b/core/fpdfapi/render/cpdf_progressiverenderer.cpp index 4505db6874..984ad75834 100644 --- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp +++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp @@ -28,8 +28,10 @@ CPDF_ProgressiveRenderer::CPDF_ProgressiveRenderer( 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) { -- cgit v1.2.3