diff --git a/rpcs3/rpcs3qt/msg_dialog_frame.cpp b/rpcs3/rpcs3qt/msg_dialog_frame.cpp index b42d83da58..84dbcd51d7 100644 --- a/rpcs3/rpcs3qt/msg_dialog_frame.cpp +++ b/rpcs3/rpcs3qt/msg_dialog_frame.cpp @@ -101,14 +101,14 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title) connect(m_button_yes, &QAbstractButton::clicked, [this]() { g_last_user_response = CELL_MSGDIALOG_BUTTON_YES; - on_close(CELL_MSGDIALOG_BUTTON_YES); + if (on_close) on_close(CELL_MSGDIALOG_BUTTON_YES); m_dialog->accept(); }); connect(m_button_no, &QAbstractButton::clicked, [this]() { g_last_user_response = CELL_MSGDIALOG_BUTTON_NO; - on_close(CELL_MSGDIALOG_BUTTON_NO); + if (on_close) on_close(CELL_MSGDIALOG_BUTTON_NO); m_dialog->accept(); }); } @@ -133,7 +133,7 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title) connect(m_button_ok, &QAbstractButton::clicked, [this]() { g_last_user_response = CELL_MSGDIALOG_BUTTON_OK; - on_close(CELL_MSGDIALOG_BUTTON_OK); + if (on_close) on_close(CELL_MSGDIALOG_BUTTON_OK); m_dialog->accept(); }); } @@ -145,7 +145,7 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title) if (!type.disable_cancel) { g_last_user_response = CELL_MSGDIALOG_BUTTON_ESCAPE; - on_close(CELL_MSGDIALOG_BUTTON_ESCAPE); + if (on_close) on_close(CELL_MSGDIALOG_BUTTON_ESCAPE); } });