fixed memory leak in wxFilesystemHandler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ec939b6813
commit
51f79d5c67
@ -97,8 +97,14 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location)
|
||||
}
|
||||
|
||||
ft = m_MimeMng -> GetFileTypeFromExtension(ext);
|
||||
if (ft && (ft -> GetMimeType(&mime))) return mime;
|
||||
else return wxEmptyString;
|
||||
if (ft && (ft -> GetMimeType(&mime))) {
|
||||
delete ft;
|
||||
return mime;
|
||||
}
|
||||
else {
|
||||
delete ft;
|
||||
return wxEmptyString;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user