mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-27 23:25:45 +03:00
Fix potential crash
This commit is contained in:
parent
6e6368da30
commit
18b173d5c6
@ -6076,7 +6076,7 @@ void PrecacheModelSounds(studiohdr_t *pStudioHeader)
|
|||||||
void PrecacheModelSpecifiedFiles()
|
void PrecacheModelSpecifiedFiles()
|
||||||
{
|
{
|
||||||
const char **s = &g_psv.model_precache[1];
|
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)
|
if (g_psv.models[i]->type != mod_studio)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user