If a wxDropTarget is set on a wxWindow, when the window is destroyed, the wxDropTarget is de-referenced twice, with an exception occured at the second attempt.
This occurs because in the HandleDestroy() method of wxWindowMSW (row 4362 of msw/window.cpp) there is wxDELETE(m_dropTarget) without setting m_dropTarget = null and the same is executed in wxWindowBase destructor (row 515 of common/wincmn.cpp)
To fix this behaviour it should be enough to put the instruction m_dropTarget = nullptr after the delete instruction in HandleDestroy() so the second delete would takes no effect.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
The trouble with this analysis is that wxDELETE does set the pointer to null, so I don't see how can this be true and I definitely don't see any crashes in the dnd sample. Please provide a patch reproducing the problem there.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()