From 1f095fb1bd58063bf1d97765fcbcdf28e3652416 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 20 May 2024 16:13:10 -0700 Subject: [PATCH] imgui: Safer table functions --- dev/src/imbind.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/src/imbind.cpp b/dev/src/imbind.cpp index 539168dc..4cb336e8 100644 --- a/dev/src/imbind.cpp +++ b/dev/src/imbind.cpp @@ -1675,14 +1675,14 @@ nfr("table_next_row", "", "", "", "", [](StackPtr &, VM &vm) { IsInit(vm); - /*if (NTop() == N_TABLE)*/ ImGui::TableNextRow(); + if (ImGui::TableGetColumnCount()) ImGui::TableNextRow(); }); nfr("table_next_column", "", "", "", "", [](StackPtr &, VM &vm) { IsInit(vm); - /*if (NTop() == N_TABLE)*/ ImGui::TableNextColumn(); + if (ImGui::TableGetColumnCount()) ImGui::TableNextColumn(); }); nfr("table_end", "", "", "",