int nCurCount = wxListBox::GetCount();
wxASSERT_MSG(pos <= nCurCount, wxT("Invalid index passed to wxListBox"));
- GtkTreeIter* pIter;
- if (pos == nCurCount)
- {
- pIter = NULL; // append
- }
- else
+ GtkTreeIter* pIter = NULL; // append by default
+ GtkTreeIter iter;
+ if (pos != nCurCount)
{
- GtkTreeIter iter;
gboolean res = gtk_tree_model_iter_nth_child(
GTK_TREE_MODEL(m_liststore),
&iter, NULL, //NULL = parent = get first