Add null pointer check

This commit is contained in:
mittorn 2018-10-20 21:56:40 +07:00
parent 7180dfb4d7
commit a45dd7648b
1 changed files with 2 additions and 1 deletions

View File

@ -233,7 +233,8 @@ void CXenTreeTrigger::Touch( CBaseEntity *pOther )
if( pev->owner )
{
CBaseEntity *pEntity = CBaseEntity::Instance( pev->owner );
pEntity->Touch( pOther );
if( pEntity )
pEntity->Touch( pOther );
}
}