Fix bugs in wxEnumProperty introduced by r76562.
The compilation fixes introduced run-time fixes due to not account for the use of NULL pointers (which are not accepted as choices cache but are accepted as choices values, go figure). Closes #16266. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1130,9 +1130,10 @@ wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name,
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( ; untranslatedLabels; untranslatedLabels++, values++ )
|
||||
for ( int i = 0; *untranslatedLabels; untranslatedLabels++ )
|
||||
{
|
||||
m_choices.Add(wxGetTranslation(*untranslatedLabels), *values);
|
||||
const long val = values ? *values++ : i++;
|
||||
m_choices.Add(wxGetTranslation(*untranslatedLabels), val);
|
||||
}
|
||||
|
||||
if ( GetItemCount() )
|
||||
|
Reference in New Issue
Block a user