Skip to content

Commit

Permalink
Fix potential crash
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Dec 7, 2024
1 parent 6e6368d commit 18b173d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rehlds/engine/sv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6076,7 +6076,7 @@ void PrecacheModelSounds(studiohdr_t *pStudioHeader)
void PrecacheModelSpecifiedFiles()
{
const char **s = &g_psv.model_precache[1];
for (size_t i = 1; i < ARRAYSIZE(g_psv.model_precache) && *s != nullptr; i++, s++)
for (size_t i = 1; i < ARRAYSIZE(g_psv.model_precache) && *s && g_psv.models[i]; i++, s++)
{
if (g_psv.models[i]->type != mod_studio)
continue;
Expand Down

0 comments on commit 18b173d

Please sign in to comment.