fixed loop deleting the old filters in SetWildcard() after last commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1151,8 +1151,9 @@ void wxGenericFileDialog::SetWildcard(const wxString& wildCard)
|
|||||||
wildFilters);
|
wildFilters);
|
||||||
wxCHECK_RET( count, wxT("wxFileDialog: bad wildcard string") );
|
wxCHECK_RET( count, wxT("wxFileDialog: bad wildcard string") );
|
||||||
|
|
||||||
size_t n, old_count = m_choice->GetCount();
|
const size_t countOld = m_choice->GetCount();
|
||||||
for ( n = 0; n < count; n++ )
|
size_t n;
|
||||||
|
for ( n = 0; n < countOld; n++ )
|
||||||
{
|
{
|
||||||
delete (wxString *)m_choice->GetClientData(n);
|
delete (wxString *)m_choice->GetClientData(n);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user