engine: client: console: fix a rare crash when we're in game, console is enabled but it's empty
With ui_allowconsole toggle it's easy to reproduce: join game without console, go to menu, enable console and return back to game.
This commit is contained in:
parent
cac5852e68
commit
9a2588f7eb
1 changed files with 1 additions and 1 deletions
|
@ -1753,7 +1753,7 @@ static void Con_DrawNotify( void )
|
|||
|
||||
if( host.allow_console && ( !Cvar_VariableInteger( "cl_background" ) && !Cvar_VariableInteger( "sv_background" )))
|
||||
{
|
||||
for( i = CON_LINES_COUNT - con.num_times; i < CON_LINES_COUNT; i++ )
|
||||
for( i = Q_max( 0, CON_LINES_COUNT - con.num_times ); i < CON_LINES_COUNT; i++ )
|
||||
{
|
||||
con_lineinfo_t *l = &CON_LINES( i );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue