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:
Vadim Zeitlin 2012-12-08 00:37:31 +00:00
parent 4d35172f52
commit bcfe86f0b5

View File

@ -181,8 +181,12 @@ void wxChoice::DoDeleteOneItem(unsigned int n)
GtkTreeModel* model = gtk_combo_box_get_model( combobox );
GtkListStore* store = GTK_LIST_STORE(model);
GtkTreeIter iter;
gtk_tree_model_iter_nth_child( model, &iter,
NULL, (gint) n );
if ( !gtk_tree_model_iter_nth_child(model, &iter, NULL, 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 );
m_clientData.RemoveAt( n );