Skip to content

Commit

Permalink
engine: client: add NULL check to prevent crash if in_graph key doesn…
Browse files Browse the repository at this point in the history
…'t exist in client.dll
  • Loading branch information
a1batross committed Dec 3, 2024
1 parent 18a973d commit b030cdb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions engine/client/cl_netgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit b030cdb

Please sign in to comment.