summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_progressive.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/fpdfsdk/fpdf_progressive.cpp b/fpdfsdk/fpdf_progressive.cpp
index fc6ceab38e..2d8f125128 100644
--- a/fpdfsdk/fpdf_progressive.cpp
+++ b/fpdfsdk/fpdf_progressive.cpp
@@ -88,13 +88,6 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,
DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
- if (!pPage)
- return;
-
- CPDF_PageRenderContext* pContext = pPage->GetRenderContext();
- if (!pContext)
- return;
-
- pContext->m_pDevice->RestoreState(false);
- pPage->SetRenderContext(nullptr);
+ if (pPage)
+ pPage->SetRenderContext(nullptr);
}