From 032af30f523adca8fb1606c92bc2975a1ae2cd1e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 3 Dec 1999 14:50:12 +0000 Subject: [PATCH] fixes for icon-inherits-from-bitmap mode git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/cursor.cpp | 9 +++++++-- src/msw/icon.cpp | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 4cea893b6b..f9f6167d68 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -67,8 +67,13 @@ wxCursorRefData::wxCursorRefData() void wxCursorRefData::Free() { - if ( m_hCursor && m_destroyCursor ) - ::DestroyCursor((HCURSOR)m_hCursor); + if ( m_hCursor ) + { + if ( m_destroyCursor ) + ::DestroyCursor((HCURSOR)m_hCursor); + + m_hCursor = 0; + } } // ---------------------------------------------------------------------------- diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index 0c2187db94..1ca4dafb12 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -62,7 +62,11 @@ void wxIconRefData::Free() { if ( m_hIcon ) + { ::DestroyIcon((HICON) m_hIcon); + + m_hIcon = 0; + } } // ----------------------------------------------------------------------------