fix crash in UTIL_AreHostagesImprov (#626)

add check g_engfuncs.pfnEngCheckParm is nullptr or not.
This commit is contained in:
OrangePee1 2021-05-17 03:55:22 +08:00 committed by GitHub
parent 64059d1026
commit a27ce74e10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1725,6 +1725,9 @@ bool UTIL_AreHostagesImprov()
} }
#ifdef REGAMEDLL_ADD #ifdef REGAMEDLL_ADD
if (g_engfuncs.pfnEngCheckParm == nullptr)
return false;
// someday in CS 1.6 // someday in CS 1.6
int improv = ENG_CHECK_PARM("-host-improv", nullptr); int improv = ENG_CHECK_PARM("-host-improv", nullptr);
if (improv) if (improv)