Apply patch #1443819 from Paul Cornett - move the GtkTreeIter to the outer scope as to not assign the address of an

auto variable to an outer scope variable (now both are in the outer (function) scope).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp 2006-03-07 06:55:26 +00:00
parent 7e48f6d964
commit 2eb1512ac8

View 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)
GtkTreeIter* pIter = NULL; // append by default
GtkTreeIter iter;
if (pos != nCurCount)
{
pIter = NULL; // append
}
else
{
GtkTreeIter iter;
gboolean res = gtk_tree_model_iter_nth_child(
GTK_TREE_MODEL(m_liststore),
&iter, NULL, //NULL = parent = get first