Check gtk_tree_model_iter_nth_child() return value in wxChoice code.
This is probably harmless but check the return value just to suppress Coverity warning about not doing it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4d35172f52
commit
bcfe86f0b5
@ -181,8 +181,12 @@ void wxChoice::DoDeleteOneItem(unsigned int n)
|
|||||||
GtkTreeModel* model = gtk_combo_box_get_model( combobox );
|
GtkTreeModel* model = gtk_combo_box_get_model( combobox );
|
||||||
GtkListStore* store = GTK_LIST_STORE(model);
|
GtkListStore* store = GTK_LIST_STORE(model);
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gtk_tree_model_iter_nth_child( model, &iter,
|
if ( !gtk_tree_model_iter_nth_child(model, &iter, NULL, n) )
|
||||||
NULL, (gint) n );
|
{
|
||||||
|
// This is really not supposed to happen for a valid index.
|
||||||
|
wxFAIL_MSG(wxS("Item unexpectedly not found."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
gtk_list_store_remove( store, &iter );
|
gtk_list_store_remove( store, &iter );
|
||||||
|
|
||||||
m_clientData.RemoveAt( n );
|
m_clientData.RemoveAt( n );
|
||||||
|
Loading…
Reference in New Issue
Block a user