summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DolphinWX/Main.cpp')
-rw-r--r--Source/Core/DolphinWX/Main.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp
index a9a7af6854..20460e258c 100644
--- a/Source/Core/DolphinWX/Main.cpp
+++ b/Source/Core/DolphinWX/Main.cpp
@@ -372,16 +372,13 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
{
#endif
NetPlayDialog*& npd = NetPlayDialog::GetInstance();
- if (npd == nullptr)
- {
- return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption),
- (yes_no) ? wxYES_NO : wxOK, wxWindow::FindFocus());
- }
- else
+ if (npd != nullptr && npd->IsShown())
{
npd->AppendChat("/!\\ " + std::string{text});
return true;
}
+ return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption), (yes_no) ? wxYES_NO : wxOK,
+ wxWindow::FindFocus());
#ifdef __WXGTK__
}
else