[UI] Fix use-after-free in NoProfileDialog when closing
This commit is contained in:
@@ -45,7 +45,7 @@ void NoProfileDialog::OnDraw(ImGuiIO& io) {
|
|||||||
ImGuiWindowFlags_AlwaysAutoResize |
|
ImGuiWindowFlags_AlwaysAutoResize |
|
||||||
ImGuiWindowFlags_HorizontalScrollbar)) {
|
ImGuiWindowFlags_HorizontalScrollbar)) {
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
delete this;
|
Close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ void NoProfileDialog::OnDraw(ImGuiIO& io) {
|
|||||||
if (ImGui::Button("Close") || !dialog_open) {
|
if (ImGui::Button("Close") || !dialog_open) {
|
||||||
emulator_window_->SetHotkeysState(true);
|
emulator_window_->SetHotkeysState(true);
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
delete this;
|
Close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|||||||
Reference in New Issue
Block a user