git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45157
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return false;
wxMimeTypeCommands *entry = new wxMimeTypeCommands();
return false;
wxMimeTypeCommands *entry = new wxMimeTypeCommands();
size_t nCount = strTypes.GetCount();
for ( size_t i = 0; i < nCount; i++ )
{
size_t nCount = strTypes.GetCount();
for ( size_t i = 0; i < nCount; i++ )
{
- if ( !m_manager->DoAssociation
- (
+ if ( m_manager->DoAssociation
+ (
strTypes[i],
strIcon,
entry,
strExtensions,
strDesc
strTypes[i],
strIcon,
entry,
strExtensions,
strDesc
+ // we don't need to free entry now, DoAssociation() took ownership
+ // of it
+ ok = true;
+ if ( !ok )
+ delete entry;
+