From a1710699cd4140c7f7d2e8de35e0305579162cc5 Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Wed, 4 Mar 2026 20:50:30 +0900 Subject: [PATCH] [UI] Fix use-after-free in NoProfileDialog when closing --- src/xenia/app/profile_dialogs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/app/profile_dialogs.cc b/src/xenia/app/profile_dialogs.cc index fbd3dd864..206e8e454 100644 --- a/src/xenia/app/profile_dialogs.cc +++ b/src/xenia/app/profile_dialogs.cc @@ -45,7 +45,7 @@ void NoProfileDialog::OnDraw(ImGuiIO& io) { ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_HorizontalScrollbar)) { ImGui::End(); - delete this; + Close(); return; } @@ -82,7 +82,7 @@ void NoProfileDialog::OnDraw(ImGuiIO& io) { if (ImGui::Button("Close") || !dialog_open) { emulator_window_->SetHotkeysState(true); ImGui::End(); - delete this; + Close(); return; } ImGui::End();