Fix minor memory leak

modernize-cmake-1
MrSimbax 2019-02-25 23:42:34 +01:00
parent 2d3d03cc38
commit 61a7aa2592
1 changed files with 5 additions and 1 deletions

View File

@ -180,7 +180,11 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte
std::string CSystemUtils::GetBasePath()
{
if (m_basePath.empty())
m_basePath = SDL_GetBasePath();
{
auto* path = SDL_GetBasePath();
m_basePath = path;
SDL_free(path);
}
return m_basePath;
}