Check if pEntity is null before showing trigger
This commit is contained in:
parent
3803f18be4
commit
4878bce085
1 changed files with 6 additions and 1 deletions
|
@ -21,6 +21,11 @@ CON_COMMAND(report_triggerinfo, "")
|
|||
{
|
||||
C_BaseEntity* pEntity = (C_BaseEntity*) cl_entitylist->GetClientEntity( i );
|
||||
|
||||
if ( !pEntity )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!IsTriggerClass(pEntity))
|
||||
{
|
||||
continue;
|
||||
|
@ -50,7 +55,7 @@ void Cmd_ShowtriggersToggle_f( const CCommand &args )
|
|||
{
|
||||
C_BaseEntity* pEntity = (C_BaseEntity*) cl_entitylist->GetClientEntity( i );
|
||||
|
||||
if ( IsTriggerClass(pEntity) )
|
||||
if ( pEntity && IsTriggerClass(pEntity) )
|
||||
{
|
||||
if ( pEntity->IsEffectActive( EF_NODRAW ) )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue