engine: client: add NULL check to prevent crash if in_graph key doesn't exist in client.dll
This commit is contained in:
parent
18a973d4f2
commit
b030cdb4e3
1 changed files with 2 additions and 9 deletions
|
@ -657,18 +657,11 @@ void SCR_DrawNetGraph( void )
|
|||
|
||||
in_graph = clgame.dllFuncs.KB_Find( "in_graph" );
|
||||
|
||||
if( in_graph->state & 1 )
|
||||
{
|
||||
if( in_graph && in_graph->state & 1 )
|
||||
graphtype = 2;
|
||||
}
|
||||
else if( net_graph.value != 0.0f )
|
||||
{
|
||||
graphtype = (int)net_graph.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
else return;
|
||||
|
||||
if( net_scale.value <= 0 )
|
||||
Cvar_SetValue( "net_scale", 0.1f );
|
||||
|
|
Loading…
Add table
Reference in a new issue