diff options
author | Lei Zhang <thestig@chromium.org> | 2017-11-22 20:21:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-22 20:21:21 +0000 |
commit | a1c4205eff6c8a0bb6a6abf58bbec06cb0fe22c5 (patch) | |
tree | 9a5cf8db989cc3187970fcfacd0462255cf34a87 /core/fxge/win32/win32_int.h | |
parent | a27e55e1c8c04fa85e2132e98e92b42d1a084b1f (diff) | |
download | pdfium-a1c4205eff6c8a0bb6a6abf58bbec06cb0fe22c5.tar.xz |
Call FreeLibrary() in CGdiplusExt.chromium/3276
BUG=pdfium:939
Change-Id: I4204965bd8b81bea3c485fcb27adfa212cce4e69
Reviewed-on: https://pdfium-review.googlesource.com/19190
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/win32/win32_int.h')
-rw-r--r-- | core/fxge/win32/win32_int.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index c4559f4741..d4f2597033 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -10,6 +10,7 @@ #include <windows.h> #include <memory> +#include <vector> #include "core/fxcrt/retain_ptr.h" #include "core/fxge/cfx_pathdata.h" @@ -32,6 +33,7 @@ class CGdiplusExt { public: CGdiplusExt(); ~CGdiplusExt(); + void Load(); bool IsAvailable() { return !!m_hModule; } bool StretchBitMask(HDC hDC, @@ -108,13 +110,13 @@ class CGdiplusExt { bool GdiRemoveFontMemResourceEx(void* handle); RetainPtr<CFX_DIBitmap> LoadDIBitmap(WINDIB_Open_Args_ args); - FARPROC m_Functions[100]; - FuncType_GdiAddFontMemResourceEx m_pGdiAddFontMemResourceEx; - FuncType_GdiRemoveFontMemResourceEx m_pGdiRemoveFontMemResourseEx; + std::vector<FARPROC> m_Functions; + FuncType_GdiAddFontMemResourceEx m_pGdiAddFontMemResourceEx = nullptr; + FuncType_GdiRemoveFontMemResourceEx m_pGdiRemoveFontMemResourseEx = nullptr; protected: - HMODULE m_hModule; - HMODULE m_GdiModule; + HMODULE m_hModule = nullptr; + HMODULE m_GdiModule = nullptr; }; class CWin32Platform { |