Fix #4931
The assert could be triggered when a new sign-in request was sent before the first one was resolved, usually when using the enter key to request the sign in. Since it can happen in normal operations to have the player profile status different from signing out or signed out, an assert is incorrect. Also fix server-only compilation for the previous commit.
This commit is contained in:
parent
01d62be5de
commit
e64e2d8cd5
@ -107,7 +107,6 @@ namespace Online
|
||||
m_online_state = OS_SIGNED_OUT;
|
||||
m_token = "";
|
||||
m_profile = NULL;
|
||||
|
||||
} // OnlinePlayerProfile
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@ -136,10 +135,11 @@ namespace Online
|
||||
void OnlinePlayerProfile::requestSignIn(const core::stringw &username,
|
||||
const core::stringw &password)
|
||||
{
|
||||
// If the player changes the online account, there can be a
|
||||
// logout stil happening.
|
||||
assert(m_online_state == OS_SIGNED_OUT ||
|
||||
m_online_state == OS_SIGNING_OUT);
|
||||
// Avoid multiple sign in requests from happening at once,
|
||||
// this can occur for example when using the enter key to request a sign-in.
|
||||
if (m_online_state != OS_SIGNED_OUT && m_online_state != OS_SIGNING_OUT)
|
||||
return;
|
||||
|
||||
auto request = std::make_shared<PrivateRequest::SignInRequest>();
|
||||
|
||||
// We can't use setUserDetail here, since there is no token yet
|
||||
|
@ -933,6 +933,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
} // scale_rtts
|
||||
else if (name == "benchmarkCurrent")
|
||||
{
|
||||
#ifndef SERVER_ONLY
|
||||
// TODO - Add the possibility to benchmark more tracks and define replay benchmarks in
|
||||
// a config file
|
||||
const std::string bf_bench("benchmark_black_forest.replay");
|
||||
@ -961,6 +962,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
{
|
||||
startBenchmark();
|
||||
}
|
||||
#endif
|
||||
} // benchmarkCurrent
|
||||
// TODO - Add a standard benchmark testing multiple presets
|
||||
/*else if (name == "benchmarkStandard")
|
||||
|
Loading…
Reference in New Issue
Block a user