Skip to content

Commit

Permalink
overlay: Fix crash when table_columns is 0
Browse files Browse the repository at this point in the history
Can happen from config file sometimes.
  • Loading branch information
misyltoad authored and flightlessmango committed Oct 24, 2023
1 parent 1613276 commit 9393066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2&
if(params.enabled[OVERLAY_PARAM_ENABLED_horizontal])
table_flags = ImGuiTableFlags_NoClip | ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoHostExtendX;

if (!params.no_display && !steam_focused){
if (!params.no_display && !steam_focused && params.table_columns){
ImGui::Begin("Main", &gui_open, ImGuiWindowFlags_NoDecoration);
if (ImGui::BeginTable("hud", params.table_columns, table_flags )) {
HUDElements.place = 0;
Expand Down

0 comments on commit 9393066

Please sign in to comment.