diff --git a/src/game/client/components/menus_settings_assets.cpp b/src/game/client/components/menus_settings_assets.cpp index 00c8338a2..e7c50ee39 100644 --- a/src/game/client/components/menus_settings_assets.cpp +++ b/src/game/client/components/menus_settings_assets.cpp @@ -227,9 +227,10 @@ int CMenus::ParticlesScan(const char *pName, int IsDir, int DirType, void *pUser int CMenus::HudScan(const char *pName, int IsDir, int DirType, void *pUser) { - CMenus *pMenus = (CMenus *)pUser; - IGraphics *pGraphics = pMenus->Graphics(); - return AssetScan(pName, IsDir, DirType, pMenus->m_HudList, "hud", pGraphics, pUser); + auto *pRealUser = (SMenuAssetScanUser *)pUser; + auto *pThis = (CMenus *)pRealUser->m_pUser; + IGraphics *pGraphics = pThis->Graphics(); + return AssetScan(pName, IsDir, DirType, pThis->m_HudList, "hud", pGraphics, pUser); } static sorted_array s_SearchEntitiesList; @@ -423,7 +424,7 @@ void CMenus::RenderSettingsCustom(CUIRect MainView) } else if(s_CurCustomTab == ASSETS_TAB_HUD) { - InitAssetList(m_HudList, "assets/hud", "hud", HudScan, Graphics(), Storage(), this); + InitAssetList(m_HudList, "assets/hud", "hud", HudScan, Graphics(), Storage(), &User); } MainView.HSplitTop(10.0f, 0, &MainView);