don't leak wxFileType returned from GetFileTypeFromExtension(); fix compilation with wxUSE_MIMETYPE==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -651,12 +651,17 @@ _T("\n"));
|
||||
wxString ext = wxFileName(flist[i]).GetExt();
|
||||
if ( ext.Lower() == _T("xrc") )
|
||||
mime = _T("text/xml");
|
||||
#if wxUSE_MIMETYPE
|
||||
else
|
||||
{
|
||||
wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext);
|
||||
if ( ft )
|
||||
{
|
||||
ft->GetMimeType(&mime);
|
||||
delete ft;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_MIMETYPE
|
||||
|
||||
s.Printf(_T(" XRC_ADD_FILE(wxT(\"XRC_resource/") + flist[i] +
|
||||
_T("\"), xml_res_file_%i, xml_res_size_%i, _T(\"%s\"));\n"),
|
||||
|
Reference in New Issue
Block a user