Fail instead of crashing in wxGTK wxCursor::CloneGDIRefData().
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Dec 2010 18:43:25 +0000 (18:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Dec 2010 18:43:25 +0000 (18:43 +0000)
commit51bf928d02b8cbf8d7f343daead32c8df1550cdc
treee35bbc348e23e87dde209cfcda8b8bc71c7b2f2e
parent5cb160c564f9c74766719f0ea2944db1211a347d
Fail instead of crashing in wxGTK wxCursor::CloneGDIRefData().

CloneGDIRefData() used wxCursorRefData copy ctor which wasn't implemented
correctly and simply copied its internal m_cursor member without incrementing
its reference count which resulted in a crash when it was then dereferenced
twice.

Unfortunately there doesn't seem to be any simple way to clone GDK cursors but
as this should be something only rarely (if ever?) needed, simply don't
implement CloneGDIRefData() at all for now and just leave an assert in it if
it's ever really called. Also don't define wxCursorRefData copy ctor at all as
it can't be done correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/gtk/cursor.cpp