Avoid crashes when the server enters the lobby (somewhat temporary,

the server needs a different kind of lobby anyway).
This commit is contained in:
hiker 2016-03-17 17:20:02 +11:00
parent b6bcf33ae0
commit 4101d72d90

View File

@ -125,6 +125,7 @@ void NetworkingLobby::init()
m_server_game_mode->setText(mode, false);
}
if(!NetworkConfig::get()->isServer())
m_start_button->setVisible(STKHost::get()->isAuthorisedToControl());
// For now create the active player and bind it to the right
@ -138,8 +139,11 @@ void NetworkingLobby::init()
void NetworkingLobby::onUpdate(float delta)
{
// FIXME Network looby should be closed when stkhost is shut down
if(NetworkConfig::get()->isClient())
{
m_start_button->setVisible(STKHost::existHost() &&
STKHost::get()->isAuthorisedToControl());
}
} // onUpdate
// ----------------------------------------------------------------------------