cstrike: fix uninitialized pointers in hud

This commit is contained in:
nillerusr 2023-08-23 23:42:08 +03:00
parent 1d4f7fb2cc
commit b7bd94c52e
2 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@ DECLARE_HUDELEMENT( CHudHealth );
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
CHudHealth::CHudHealth( const char *pElementName ) : CHudElement( pElementName ), CHudNumericDisplay(NULL, "HudHealth")
CHudHealth::CHudHealth( const char *pElementName ) : CHudElement( pElementName ), CHudNumericDisplay(NULL, "HudHealth"), m_pHealthIcon( NULL )
{
SetHiddenBits( HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD );
}
@ -172,4 +172,4 @@ void CHudHealth::Paint( void )
//draw the health icon
BaseClass::Paint();
}
}

View File

@ -47,7 +47,7 @@ private:
DECLARE_HUDELEMENT( CHudArmor );
CHudArmor::CHudArmor( const char *pName ) : CHudNumericDisplay( NULL, "HudArmor" ), CHudElement( pName )
CHudArmor::CHudArmor( const char *pName ) : CHudNumericDisplay( NULL, "HudArmor" ), CHudElement( pName ), m_pArmorIcon( NULL )
{
SetHiddenBits( HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD );
}