]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/listbox.cpp
Removed unused and outdated Watcom build files.
[wxWidgets.git] / src / gtk / listbox.cpp
index b49029ab73c4359fe9e24848612cd04f24d2220a..439946ad050d0aed579ee2bf5563dcd8c479f48b 100644 (file)
@@ -615,14 +615,10 @@ void wxListBox::GtkInsertItems(const wxArrayString& items,
     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