]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
added a check which should prevent the crash of bug 555111
[wxWidgets.git] / src / msw / listctrl.cpp
index d8dc711e4447c1445c16c0fd0ca7c25d53374a84..219ca955d7d09e6208e56dc53e48cdce0c43bf08 100644 (file)
@@ -1539,7 +1539,10 @@ bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data)
     internalData.user_fn = fn;
     internalData.data = data;
 
-    if ( !ListView_SortItems(GetHwnd(), wxInternalDataCompareFunc, &internalData) )
+    // WPARAM cast is needed for mingw/cygwin
+    if ( !ListView_SortItems(GetHwnd(),
+                             wxInternalDataCompareFunc,
+                             (WPARAM) &internalData) )
     {
         wxLogDebug(_T("ListView_SortItems() failed"));