Fix crash while parsing command menu with unsupported custom button.

Same as 3e0214ee12
This commit is contained in:
Andrey Akhmichin 2023-04-23 21:40:07 +05:00
parent 9a4eddfba9
commit c506f2a582
No known key found for this signature in database
GPG Key ID: BE329F7886439BC8
1 changed files with 1 additions and 1 deletions

View File

@ -841,7 +841,7 @@ int TeamFortressViewport::CreateCommandMenu( const char *menuFile, int direction
{
gEngfuncs.Con_Printf( "Too many menus in %s past '%s'\n", menuFile, szLastButtonText );
}
else
else if( pButton )
{
// Create the menu
m_pCommandMenus[m_iNumMenus] = CreateSubMenu( pButton, m_pCurrentCommandMenu, iButtonY );