Browse Source

Prevent possible crash.

residual_point
Andrey Akhmichin 2 years ago
parent
commit
53359b2d73
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 3
      dlls/rp/gonome.cpp
  2. 3
      dlls/rp/pitdrone.cpp

3
dlls/rp/gonome.cpp

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

3
dlls/rp/pitdrone.cpp

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

Loading…
Cancel
Save