compilation fix for wxUSE_MIMETYPE == 0; wxFileType memory leak fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -431,12 +431,15 @@ void wxDebugReportDialog::OnOpen(wxCommandEvent& )
|
|||||||
|
|
||||||
// try to get the command to open this kind of files ourselves
|
// try to get the command to open this kind of files ourselves
|
||||||
wxString command;
|
wxString command;
|
||||||
|
#if wxUSE_MIMETYPE
|
||||||
wxFileType *
|
wxFileType *
|
||||||
ft = wxTheMimeTypesManager->GetFileTypeFromExtension(fn.GetExt());
|
ft = wxTheMimeTypesManager->GetFileTypeFromExtension(fn.GetExt());
|
||||||
if ( ft )
|
if ( ft )
|
||||||
{
|
{
|
||||||
command = ft->GetOpenCommand(fn.GetFullPath());
|
command = ft->GetOpenCommand(fn.GetFullPath());
|
||||||
|
delete ft;
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_MIMETYPE
|
||||||
|
|
||||||
// if we couldn't, ask the user
|
// if we couldn't, ask the user
|
||||||
if ( command.empty() )
|
if ( command.empty() )
|
||||||
|
Reference in New Issue
Block a user