summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorAnthony Serna <Helios747@users.noreply.github.com>2016-07-23 13:57:39 -0500
committerGitHub <noreply@github.com>2016-07-23 13:57:39 -0500
commitaa34e5e20e5f66cfdbace167b98c30c1fedcf522 (patch)
tree736e91a51f59edf72b380f9738157100102f2365 /Source
parent78b68b707fbceb03d03abe0c41ffb73abb3a58d7 (diff)
parent574468c95bcbff781166ac429160e4d9fa01097a (diff)
Merge pull request #4042 from leoetlino/where-did-the-panicalert-go
Don't pipe PanicAlerts to netplay window if it isn't opened
Diffstat (limited to 'Source')
-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