X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fef15b42f36ea19d7162f4ff2750423cc954e7e3..a2327a9f80fa3240ab652da8f95a66b5c25576de:/src/msw/cursor.cpp?ds=sidebyside diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 4cea893b6b..e914dff561 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -49,9 +49,7 @@ // wxWin macros // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxCursorBase) -#endif // ---------------------------------------------------------------------------- // wxCursorRefData @@ -67,8 +65,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; + } } // ----------------------------------------------------------------------------