X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d0512bd8f4bdf548e0385b21f54f14b68b4b174..43543d985b04d065178df50dbbc998786ff97282:/src/msw/cursor.cpp diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 706b97fb92..f9f6167d68 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" @@ -66,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; + } } // ----------------------------------------------------------------------------