From d68f62c0f5d27e785832d49baf8232d2418e3841 Mon Sep 17 00:00:00 2001 From: spycrab Date: Thu, 20 Jun 2019 20:55:23 +0200 Subject: [PATCH] Core/NetPlayServer: Fix empty error messages when adding session to the index fails --- Source/Core/Core/NetPlayServer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index df1c37ef14..1169740ec2 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -206,7 +206,10 @@ void NetPlayServer::SetupIndex() session.EncryptID(Config::Get(Config::NETPLAY_INDEX_PASSWORD)); 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] { if (m_dialog != nullptr)