From c60cef10bc67a43d14c4fc7550ebddde27a744d1 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 17 Apr 2014 06:09:09 +0000 Subject: [PATCH] Avoid assertion failure when GtkTreeView interactive search is started. The treeview does an unselect_all causing a "changed" signal with no selection. The problem is easily triggered by pressing Ctrl-F (the "start-interactive-search" key binding) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/listbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index ef4042412b..edacaa6463 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -646,7 +646,7 @@ void wxListBox::GTKOnSelectionChanged() else // single selection { const int item = GetSelection(); - if ( DoChangeSingleSelection(item) ) + if (item >= 0 && DoChangeSingleSelection(item)) SendEvent(wxEVT_LISTBOX, item, true); } }