X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d0512bd8f4bdf548e0385b21f54f14b68b4b174..3d1b41968fcc7b49610de3c8ce81040b3a3096a8:/src/msw/cursor.cpp?ds=sidebyside diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 706b97fb92..e914dff561 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -32,8 +32,9 @@ #include "wx/list.h" #include "wx/utils.h" #include "wx/app.h" - #include "wx/cursor.h" + #include "wx/bitmap.h" #include "wx/icon.h" + #include "wx/cursor.h" #endif #include "wx/msw/private.h" @@ -48,9 +49,7 @@ // wxWin macros // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxCursorBase) -#endif // ---------------------------------------------------------------------------- // wxCursorRefData @@ -66,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; + } } // ----------------------------------------------------------------------------