diff options
| author | Mat Berchtold <unknown> | 2021-04-15 13:12:20 +1000 |
|---|---|---|
| committer | Mat Berchtold <unknown> | 2021-04-15 13:12:20 +1000 |
| commit | d944dbe789b276ab90ac30b9ae42112ccdab8961 (patch) | |
| tree | 2b784d381655470788c6be8aa0b12ca479babda8 | |
| parent | 6b6d6481ba86f199f645d4cd1d79496566e44798 (diff) | |
| download | scintilla-mirror-d944dbe789b276ab90ac30b9ae42112ccdab8961.tar.gz | |
Bug [#2228]. Ensure sysCaretBitmap does not leak.
| -rw-r--r-- | win32/ScintillaWin.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 19194a8bb..ea463cad0 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -571,7 +571,12 @@ ScintillaWin::ScintillaWin(HWND hwnd) { Init(); } -ScintillaWin::~ScintillaWin() {} +ScintillaWin::~ScintillaWin() { + if (sysCaretBitmap) { + ::DeleteObject(sysCaretBitmap); + sysCaretBitmap = {}; + } +} void ScintillaWin::Init() { // Initialize COM. If the app has already done this it will have |
