Skip to content

Commit 047f709

Browse files
authored
Fix crash after disconnect #2877 (#2879)
1 parent baacb27 commit 047f709

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Client/game_sa/CModelInfoSA.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,9 @@ void CModelInfoSA::RestoreAllObjectsPropertiesGroups()
17301730
{
17311731
for (const auto& pair : ms_OriginalObjectPropertiesGroups)
17321732
{
1733-
pGame->GetModelInfo(pair.first)->GetInterface()->usDynamicIndex = pair.second;
1733+
CBaseModelInfoSAInterface* pInterface = pGame->GetModelInfo(pair.first, true)->GetInterface();
1734+
if (pInterface)
1735+
pInterface->usDynamicIndex = pair.second;
17341736
}
17351737
ms_OriginalObjectPropertiesGroups.clear();
17361738
}

0 commit comments

Comments
 (0)