X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d33aec94c9217b94ada107fbd125db4c51c22ab..81c9effa8462662263c3b4eac2cfae1ef5caae2c:/samples/listctrl/listtest.cpp diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index c1fd9dc512..7b196adf03 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -631,7 +631,10 @@ void MyListCtrl::OnColClick(wxListEvent& event) void MyListCtrl::OnColRightClick(wxListEvent& event) { int col = event.GetColumn(); - SetColumnImage(col, -1); + if ( col != -1 ) + { + SetColumnImage(col, -1); + } wxLogMessage( wxT("OnColumnRightClick at %d."), event.GetColumn() ); }