Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Aug 24, 2024
1 parent e431474 commit 47b492b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Client/mods/deathmatch/logic/CResourceModelStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ void CResourceModelStreamer::ReleaseAll()

void CResourceModelStreamer::FullyReleaseModel(std::uint16_t modelId)
{
std::uint16_t &refsCount = m_requestedModels[modelId];
auto refs = m_requestedModels.find(modelId);
if (refs == m_requestedModels.end())
return;

std::uint16_t refsCount = refs->second;

if (refsCount > 0)
{
Expand Down

0 comments on commit 47b492b

Please sign in to comment.