]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes for icon-inherits-from-bitmap mode
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Dec 1999 14:50:12 +0000 (14:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Dec 1999 14:50:12 +0000 (14:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/cursor.cpp
src/msw/icon.cpp

index 4cea893b6b277315d9e0b945b0585d509e963373..f9f6167d682e168afcb8340e325a58321a13b97e 100644 (file)
@@ -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;
+    }
 }
 
 // ----------------------------------------------------------------------------
index 0c2187db94c2f03f995c0a6a929630a189494bae..1ca4dafb129be16e2bdb6d1973a025c95bedcfb8 100644 (file)
 void wxIconRefData::Free()
 {
     if ( m_hIcon )
+    {
         ::DestroyIcon((HICON) m_hIcon);
+
+        m_hIcon = 0;
+    }
 }
 
 // ----------------------------------------------------------------------------