return true;
}
-NSArray* GetTypesFromFilter( const wxString filter )
+NSArray* CopyTypesFromFilter( const wxString filter )
{
NSMutableArray* types = nil;
if ( !filter.empty() )
if ( extension.IsEmpty() )
{
- if ( types != nil )
- [types release];
+ [types release];
+ types = nil;
return nil;
}
}
else
{
- NSArray* types = GetTypesFromFilter( m_wildCard ) ;
+ NSArray* types = CopyTypesFromFilter( m_wildCard ) ;
NSOpenPanel* oPanel = [NSOpenPanel openPanel];
SetupExtraControls(oPanel);
modalDelegate: sheetDelegate
didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:)
contextInfo: nil];
+ [types release];
+ types = nil;
}
}
}
else
{
- NSArray* types = GetTypesFromFilter( m_wildCard ) ;
+ NSArray* types = CopyTypesFromFilter( m_wildCard ) ;
NSOpenPanel* oPanel = [NSOpenPanel openPanel];
SetupExtraControls(oPanel);
UnsubclassWin();
[oPanel setAccessoryView:nil];
- if ( types != nil )
- [types release];
+ [types release];
+ types = nil;
}
return GetReturnCode();