From a277deba225b1cba386c9eb1042582e2e6248394 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 8 Oct 2006 15:54:40 +0000 Subject: [PATCH] It's valid to pass wxNOT_FOUND to SetSelection in order to clear selections. Avoid assert and erroneous setting of -1. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/listbox.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index c8d292fb4d..ad3193f273 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -942,6 +942,7 @@ void wxListBox::DoSetSelection( int n, bool select ) { // ... and not generate any events in the process GtkDeselectAll(); + return; } wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetSelection") ); -- 2.45.2