cellMsgDialog: fix use-after-free

This commit is contained in:
Elad Ashkenazi 2023-02-27 14:07:35 +02:00 committed by Megamouse
parent ae14aa991d
commit 2a344e1d87
5 changed files with 6 additions and 6 deletions

View File

@ -166,7 +166,7 @@ error_code open_msg_dialog(bool is_blocking, u32 type, vm::cptr<char> msgString,
const auto notify = std::make_shared<atomic_t<bool>>(false);
const auto res = manager->create<rsx::overlays::message_dialog>()->show(is_blocking, msgString.get_ptr(), _type, [callback, userData, &return_code, is_blocking, &notify](s32 status)
const auto res = manager->create<rsx::overlays::message_dialog>()->show(is_blocking, msgString.get_ptr(), _type, [callback, userData, &return_code, is_blocking, notify](s32 status)
{
if (is_blocking && return_code)
{

View File

@ -166,7 +166,7 @@ namespace rsx
overlayman.attach_thread_input(
uid, "Home menu",
[&notify]() { *notify = true; notify->notify_one(); }
[notify]() { *notify = true; notify->notify_one(); }
);
if (g_cfg.misc.pause_during_home_menu)

View File

@ -302,14 +302,14 @@ namespace rsx
{
overlayman.attach_thread_input(
uid, "Message dialog",
[&notify]() { *notify = true; notify->notify_one(); }
[notify]() { *notify = true; notify->notify_one(); }
);
}
else
{
overlayman.attach_thread_input(
uid, "Message dialog",
[&notify]() { *notify = true; notify->notify_one(); },
[notify]() { *notify = true; notify->notify_one(); },
nullptr,
[&]()
{

View File

@ -1625,7 +1625,7 @@ namespace rsx
overlayman.attach_thread_input(
uid, "OSK",
[&notify]() { *notify = true; notify->notify_one(); }
[notify]() { *notify = true; notify->notify_one(); }
);
while (!Emu.IsStopped() && !*notify)

View File

@ -244,7 +244,7 @@ namespace rsx
overlayman.attach_thread_input(
uid, "User list dialog",
[&notify]() { *notify = true; notify->notify_one(); }
[notify]() { *notify = true; notify->notify_one(); }
);
while (!Emu.IsStopped() && !*notify)