The debugoverlay interface global is initialized to nullptr in the dedicated server. All of the NDebugOverlay functions which call into debugoverlay make sure to check whether it's nullptr before calling, with the exception of NDebugOverlay::Circle, which does no such check.
This means that enabling certain debug convars on a dedicated server can cause the server to crash instead of just doing nothing (anything that tries to draw circles has this problem, e.g. nb_debug LOOK_AT).
It can be desirable to enable some debug convars on a dedicated server purely for the text output, but this becomes infeasible if the same debug convar also tries to draw circle overlays, crashing everything.
This patch adds a nullptr check to NDebugOverlay::Circle to fix the problem.
The
debugoverlay
interface global is initialized tonullptr
in the dedicated server. All of theNDebugOverlay
functions which call intodebugoverlay
make sure to check whether it'snullptr
before calling, with the exception ofNDebugOverlay::Circle
, which does no such check.This means that enabling certain debug convars on a dedicated server can cause the server to crash instead of just doing nothing (anything that tries to draw circles has this problem, e.g.
nb_debug LOOK_AT
).It can be desirable to enable some debug convars on a dedicated server purely for the text output, but this becomes infeasible if the same debug convar also tries to draw circle overlays, crashing everything.
This patch adds a nullptr check to
NDebugOverlay::Circle
to fix the problem.