diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-01-23 11:15:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-23 11:15:10 +0100 |
commit | f4b747d3e628c85f4ccb1be6286f0169372e0a2c (patch) | |
tree | 016a4168431f0c789d3e5f72a24aaafc37e3f3ce | |
parent | d747e3014039c2002262abbde6d5465674a3de07 (diff) | |
parent | 62f3611271741dff9e793290e711a0b7f23a98e0 (diff) |
Merge pull request #25241 from dragmz/patch-8
Fix GDI objects leak when setting custom cursor
-rw-r--r-- | platform/windows/os_windows.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 9fd372fd98..5cba34ac62 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2335,6 +2335,9 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap iconinfo.hbmMask = hAndMask; iconinfo.hbmColor = hXorMask; + if (cursors[p_shape]) + DestroyIcon(cursors[p_shape]); + cursors[p_shape] = CreateIconIndirect(&iconinfo); if (p_shape == cursor_shape) { |