diff --git a/src/game/client/components/menus.h b/src/game/client/components/menus.h index 8587d0bba..af17e5f6e 100644 --- a/src/game/client/components/menus.h +++ b/src/game/client/components/menus.h @@ -520,6 +520,7 @@ protected: SHA256_DIGEST m_Sha256; CAbstractCommunityIconJob(CMenus *pMenus, const char *pCommunityId, int StorageType); + virtual ~CAbstractCommunityIconJob(); public: const char *CommunityId() const { return m_aCommunityId; } diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 6f75c58dc..6636e66f1 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -1799,6 +1799,12 @@ CMenus::CAbstractCommunityIconJob::CAbstractCommunityIconJob(CMenus *pMenus, con str_format(m_aPath, sizeof(m_aPath), "communityicons/%s.png", pCommunityId); } +CMenus::CAbstractCommunityIconJob::~CAbstractCommunityIconJob() +{ + free(m_ImageInfo.m_pData); + m_ImageInfo.m_pData = nullptr; +} + int CMenus::CCommunityIconDownloadJob::OnCompletion(int State) { State = CHttpRequest::OnCompletion(State);