Skip to content

Commit

Permalink
Merge pull request #8211 from spycrab/netplay_index_empty_error
Browse files Browse the repository at this point in the history
Core/NetPlayServer: Fix empty error messages when adding session
  • Loading branch information
spycrab committed Jun 22, 2019
2 parents 84b9b37 + d68f62c commit 981925a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Core/Core/NetPlayServer.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ void NetPlayServer::SetupIndex()
session.EncryptID(Config::Get(Config::NETPLAY_INDEX_PASSWORD)); session.EncryptID(Config::Get(Config::NETPLAY_INDEX_PASSWORD));


if (m_dialog != nullptr) if (m_dialog != nullptr)
m_dialog->OnIndexAdded(m_index.Add(session), m_index.GetLastError()); {
bool success = m_index.Add(session);
m_dialog->OnIndexAdded(success, success ? "" : m_index.GetLastError());
}


m_index.SetErrorCallback([this] { m_index.SetErrorCallback([this] {
if (m_dialog != nullptr) if (m_dialog != nullptr)
Expand Down

0 comments on commit 981925a

Please sign in to comment.