Fix double deletion bug in wxGTK wxDVC dnd code.

The row_draggable callback could blithely delete m_dragDataObject twice as it
didn't reset it to NULL after deleting it the first time. Then, if the object
wasn't changed in the meanwhile, e.g. because dragging was not allowed for
this item, it tried to do it again when called the next time resulting in a
crash.

Closes #12538.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-21 13:50:26 +00:00
parent 3e81bbbf6c
commit 41936464fd

View File

@@ -3578,6 +3578,7 @@ gboolean wxDataViewCtrlInternal::row_draggable( GtkTreeDragSource *WXUNUSED(drag
GtkTreePath *path )
{
delete m_dragDataObject;
m_dragDataObject = NULL;
wxDataViewItem item(GetOwner()->GTKPathToItem(path));
if ( !item )