[Profile] UI: Skip current draw in case of failure.

This should resolve random crash while removing profile
This commit is contained in:
Gliniak 2024-10-05 14:27:43 +02:00
parent 487f4407c3
commit 32b3151132
1 changed files with 5 additions and 1 deletions

View File

@ -183,7 +183,11 @@ void ProfileConfigDialog::OnDraw(ImGuiIO& io) {
const uint8_t user_index = const uint8_t user_index =
profile_manager->GetUserIndexAssignedToProfile(xuid); profile_manager->GetUserIndexAssignedToProfile(xuid);
DrawProfileContent(xuid, user_index, &account); if (!DrawProfileContent(xuid, user_index, &account)) {
ImGui::PopID();
ImGui::End();
return;
}
ImGui::PopID(); ImGui::PopID();
ImGui::Spacing(); ImGui::Spacing();