Skip to content

Commit c31e485

Browse files
committed
Fixed crash from TestEntity on filters
1 parent be6277c commit c31e485

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

sp/src/game/server/filters.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ void CBaseFilter::InputTestActivator( inputdata_t &inputdata )
134134
//-----------------------------------------------------------------------------
135135
void CBaseFilter::InputTestEntity( inputdata_t &inputdata )
136136
{
137+
if ( !inputdata.value.Entity() )
138+
{
139+
// HACKHACK: Not firing OnFail in this case is intentional for the time being (activator shouldn't be null)
140+
return;
141+
}
142+
137143
if ( PassesFilter( inputdata.pCaller, inputdata.value.Entity() ) )
138144
{
139145
m_OnPass.FireOutput( inputdata.value.Entity(), m_bPassCallerWhenTested ? inputdata.pCaller : this );

0 commit comments

Comments
 (0)