From: Vadim Zeitlin Date: Thu, 21 Jul 2011 13:50:26 +0000 (+0000) Subject: Fix double deletion bug in wxGTK wxDVC dnd code. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/41936464fd460f5f66db75c82672af9870e47e5f 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 --- diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 2f7e57112f..e27c908000 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -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 )