]> git.saurik.com Git - wxWidgets.git/commitdiff
Probable fix for [ 1933745 ] Crash in wxDataViewHeaderWindowBase::GetColumn()
authorRobert Roebling <robert@roebling.de>
Sat, 5 Apr 2008 12:33:03 +0000 (12:33 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 5 Apr 2008 12:33:03 +0000 (12:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index 9440be62406cf1331cc1a9ec2329427a2de693d5..95231257c6d1d3cd543bb29011a969cf7e59c1a3 100644 (file)
@@ -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;