[client] overlay: prevent possible divide by zero

This commit is contained in:
Geoffrey McRae 2023-11-11 13:18:01 +11:00
parent 0a9784d09d
commit a0f5907cb6

View File

@ -143,6 +143,12 @@ static int graphs_render(void * udata, bool interactive,
++graphCount; ++graphCount;
} }
if (!graphCount)
{
ll_unlock(gs.graphs);
return 0;
}
ImVec2 pos = {0.0f, 0.0f}; ImVec2 pos = {0.0f, 0.0f};
igSetNextWindowBgAlpha(0.4f); igSetNextWindowBgAlpha(0.4f);
igSetNextWindowPos(pos, ImGuiCond_FirstUseEver, pos); igSetNextWindowPos(pos, ImGuiCond_FirstUseEver, pos);