mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: client: add NULL check to prevent crash if in_graph key doesn't exist in client.dll
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user