From aeeaf52719e8b801d019614d265faa057e971c17 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 18 Jan 2026 14:04:17 -0600 Subject: [PATCH] fix null pointer crash in voice label creation. if statement was using comparison (==) instead of assignment (=), leaving pLabel uninitialized and m_playerName as null. --- game_shared/voice_status_hud.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game_shared/voice_status_hud.cpp b/game_shared/voice_status_hud.cpp index 97c1cd59..3972da24 100644 --- a/game_shared/voice_status_hud.cpp +++ b/game_shared/voice_status_hud.cpp @@ -385,7 +385,8 @@ void CVoiceStatusHud::UpdateSpeakerStatus( int entindex, bool bTalking ) // If we don't have a label for this guy yet, then create one. if ( !pLabel ) { - if ( pLabel = GetFreeVoiceLabel() ) + pLabel = GetFreeVoiceLabel(); + if ( pLabel ) { // Get the name from the engine. hud_player_info_t info; @@ -455,4 +456,4 @@ int CVoiceStatusHud::Draw( float flTime ) m_Labels[i]->Draw(); return 1; -} \ No newline at end of file +}