From a27ce74e10189a801cd11da535324f1dccf14484 Mon Sep 17 00:00:00 2001 From: OrangePee1 <56338098+OrangePee1@users.noreply.github.com> Date: Mon, 17 May 2021 03:55:22 +0800 Subject: [PATCH] fix crash in UTIL_AreHostagesImprov (#626) add check g_engfuncs.pfnEngCheckParm is nullptr or not. --- regamedll/dlls/util.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/regamedll/dlls/util.cpp b/regamedll/dlls/util.cpp index 4a602590..8385be35 100644 --- a/regamedll/dlls/util.cpp +++ b/regamedll/dlls/util.cpp @@ -1725,6 +1725,9 @@ bool UTIL_AreHostagesImprov() } #ifdef REGAMEDLL_ADD + if (g_engfuncs.pfnEngCheckParm == nullptr) + return false; + // someday in CS 1.6 int improv = ENG_CHECK_PARM("-host-improv", nullptr); if (improv)