From: Robert Roebling Date: Sat, 5 Apr 2008 12:33:03 +0000 (+0000) Subject: Probable fix for [ 1933745 ] Crash in wxDataViewHeaderWindowBase::GetColumn() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dd570ceb10abf2c0d9d4da785efb46f9087e10f2 Probable fix for [ 1933745 ] Crash in wxDataViewHeaderWindowBase::GetColumn() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 9440be6240..95231257c6 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -1464,7 +1464,7 @@ bool wxDataViewHeaderWindowMSW::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARA case HDN_BEGINDRAG: // user has started to reorder a column - if (!GetColumn(nmHDR->iItem)->IsReorderable()) + if ((nmHDR->iItem != -1) && (!GetColumn(nmHDR->iItem)->IsReorderable())) { // veto it! *result = TRUE;