summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 80aad14ac2..227843ec5c 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -177,11 +177,11 @@ FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy)
return FALSE;
}
-CCodec_ModuleMgr* g_pCodecModule = NULL;
+CCodec_ModuleMgr* g_pCodecModule = nullptr;
DLLEXPORT void STDCALL FPDF_InitLibrary()
{
- g_pCodecModule = CCodec_ModuleMgr::Create();
+ g_pCodecModule = new CCodec_ModuleMgr();
CFX_GEModule::Create();
CFX_GEModule::Get()->SetCodecModule(g_pCodecModule);
@@ -199,7 +199,9 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary()
CPDFXFA_App::ReleaseInstance();
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();
- g_pCodecModule->Destroy();
+
+ delete g_pCodecModule;
+ g_pCodecModule = nullptr;
}
#ifndef _WIN32