X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f74e0d132e73250ef422c06175dcf7e4146ec57..35bb3cb155917b4287fb2a3841bea22919a3d499:/src/mac/carbon/cursor.cpp diff --git a/src/mac/carbon/cursor.cpp b/src/mac/carbon/cursor.cpp index 34d1284ea5..f6cb3ddfa3 100644 --- a/src/mac/carbon/cursor.cpp +++ b/src/mac/carbon/cursor.cpp @@ -31,8 +31,7 @@ class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData { DECLARE_NO_COPY_CLASS(wxCursorRefData) - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxCursor; + friend class wxCursor; public: wxCursorRefData(); @@ -501,7 +500,8 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho { image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX ) ; image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY ) ; - delete m_refData ; + m_refData->DecRef() ; + m_refData = NULL ; CreateFromImage( image ) ; } #endif