X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11e1c70d8e6aa75e2ecb660fffd61b6cfcb8ffc7..8aaef28406647d6aa706c34f57dd151f00b18e5b:/src/gtk/listbox.cpp?ds=sidebyside diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index ae049dada8..9027f25b83 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -310,8 +310,10 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, gtk_widget_show( GTK_WIDGET(m_list) ); wxSize newSize = size; - if (newSize.x == -1) newSize.x = 100; - if (newSize.y == -1) newSize.y = 110; + if (newSize.x == -1) + newSize.x = 100; + if (newSize.y == -1) + newSize.y = 110; SetSize( newSize.x, newSize.y ); if ( style & wxLB_SORT ) @@ -319,6 +321,10 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, // this will change DoAppend() behaviour m_strings = new wxSortedArrayString; } + else + { + m_strings = (wxSortedArrayString *)NULL; + } for (int i = 0; i < n; i++) {