mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #637 from necropotame/pr-i636-memoryleak
Fixed memory leak after gametype change
This commit is contained in:
commit
acb1ada28c
|
@ -109,6 +109,9 @@ int CMapImages::GetEntities()
|
|||
|
||||
char path[64];
|
||||
str_format(path, sizeof(path), "editor/entities_clear/%s.png", file);
|
||||
|
||||
if(m_EntitiesTextures >= 0)
|
||||
Graphics()->UnloadTexture(m_EntitiesTextures);
|
||||
m_EntitiesTextures = Graphics()->LoadTexture(path, IStorage::TYPE_ALL, CImageInfo::FORMAT_AUTO, 0);
|
||||
|
||||
str_copy(m_aEntitiesGameType, Info.m_aGameType, sizeof(m_aEntitiesGameType));
|
||||
|
|
Loading…
Reference in a new issue