From 0e6b06df5af2b077cacbc17593f6842f80ba3ad2 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Fri, 4 Nov 2022 02:11:20 +0500 Subject: [PATCH] Prevent possible crash. --- dlls/CAd/gonome.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/CAd/gonome.cpp b/dlls/CAd/gonome.cpp index 5c8e8596..b3beac40 100644 --- a/dlls/CAd/gonome.cpp +++ b/dlls/CAd/gonome.cpp @@ -418,7 +418,7 @@ void CGonome::HandleAnimEvent(MonsterEvent_t *pEvent) vecSpitOffset = vecArmPos; UTIL_BloodDrips( vecSpitOffset, UTIL_RandomBloodVector(), BLOOD_COLOR_RED, 35 ); - if( pEvent->event == GONOME_AE_THROW ) + if( pEvent->event == GONOME_AE_THROW && m_hEnemy != 0 ) { vecSpitDir = ((m_hEnemy->pev->origin + m_hEnemy->pev->view_ofs) - vecSpitOffset).Normalize();