ImGuiOverlays: Fix possible crash in save state selector

This commit is contained in:
Stenzek 2024-04-17 23:52:19 +10:00 committed by Connor McLaughlin
parent 410e950da6
commit 3c901543bd
1 changed files with 12 additions and 11 deletions

View File

@ -1004,18 +1004,19 @@ void SaveStateSelectorUI::Draw()
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoBackground);
{
ImGui::SetCursorPosX(padding);
ImGui::BeginTable("table", 2);
if (ImGui::BeginTable("table", 2))
{
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_load_legend.c_str());
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_prev_legend.c_str());
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_save_legend.c_str());
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_next_legend.c_str());
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_load_legend.c_str());
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_prev_legend.c_str());
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_save_legend.c_str());
ImGui::TableNextColumn();
ImGui::TextUnformatted(s_next_legend.c_str());
ImGui::EndTable();
ImGui::EndTable();
}
}
ImGui::EndChild();
}