From f716f0bd85cabfa02cea1d092890a0dea67ef0e3 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 30 Jan 2017 10:04:07 -0800 Subject: Refcount CPDF_OCContext. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoids explicit deletes through CPDF_RenderOptions holding pointers to it which may have been copy constructed. Ick. Change-Id: Ic044b66d13bd7c5eaa53de995373858081e115ec Reviewed-on: https://pdfium-review.googlesource.com/2451 Reviewed-by: dsinclair Reviewed-by: Nicolás Peña Commit-Queue: Tom Sepez --- core/fpdfdoc/cpdf_annotlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfdoc/cpdf_annotlist.cpp') diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp index 1ad6ab23a6..b1bc4c9ca9 100644 --- a/core/fpdfdoc/cpdf_annotlist.cpp +++ b/core/fpdfdoc/cpdf_annotlist.cpp @@ -126,7 +126,7 @@ void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, continue; if (pOptions) { - CPDF_OCContext* pOCContext = pOptions->m_pOCContext; + CFX_RetainPtr pOCContext = pOptions->m_pOCContext; CPDF_Dictionary* pAnnotDict = pAnnot->GetAnnotDict(); if (pOCContext && pAnnotDict && !pOCContext->CheckOCGVisible(pAnnotDict->GetDictFor("OC"))) { -- cgit v1.2.3