Prevent possible crash.

This commit is contained in:
Andrey Akhmichin 2022-11-04 02:07:09 +05:00
parent c14963d2c2
commit 53359b2d73
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
2 changed files with 6 additions and 0 deletions

View File

@ -400,6 +400,9 @@ void CGonome::HandleAnimEvent(MonsterEvent_t *pEvent)
break;
case GONOME_AE_SPIT:
{
if( m_hEnemy == 0 )
return;
Vector vecSpitOffset;
Vector vecSpitDir;

View File

@ -497,6 +497,9 @@ void CPitDrone::HandleAnimEvent(MonsterEvent_t *pEvent)
case PIT_DRONE_AE_SPIT:
{
if( m_hEnemy == 0 )
return;
spikes--;
if( spikes < 0 )
{