Skip to content

Commit c97deff

Browse files
committed
Add nullptr check at CEntityKeyValues::AddConnectionDesc
1 parent 84e8276 commit c97deff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

entity2/entitykeyvalues.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ void CEntityKeyValues::AddConnectionDesc(
186186
desc->m_pszOverrideParam = m_pAllocator->AllocString( pszOverrideParam ? pszOverrideParam : "" );
187187
desc->m_flDelay = flDelay;
188188
desc->m_nTimesToFire = nTimesToFire;
189-
desc->m_KV3Value = *kv3value;
189+
190+
if(kv3value)
191+
desc->m_KV3Value = *kv3value;
190192
}
191193

192194
void CEntityKeyValues::RemoveConnectionDesc( int nDesc )

0 commit comments

Comments
 (0)