Skip to content

Commit

Permalink
Merge pull request #330 from fortressforever/fixes/bonusfire-safety
Browse files Browse the repository at this point in the history
Add null pointer safety to fx_bonusfire
  • Loading branch information
squeek502 committed Sep 19, 2016
2 parents 917fb3c + 8bbb56d commit 4f2aa4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cl_dll/ff/ff_fx_bonusfire.cpp
Expand Up @@ -50,7 +50,11 @@ void BonusFireCallback( const CEffectData &data )

Vector projectileOrigin = data.m_vOrigin;
float scale = data.m_flScale;
CBaseEntity *pAffectedEntity = ClientEntityList().GetEnt( data.m_hEntity.GetEntryIndex() );
CBaseEntity *pAffectedEntity = data.getEntity();

if ( !pAffectedEntity )
return;

Vector affectedOrigin = pAffectedEntity->GetAbsOrigin();
Vector deltaVec = (affectedOrigin - projectileOrigin);
VectorNormalize( deltaVec );
Expand Down

0 comments on commit 4f2aa4f

Please sign in to comment.