Fix possible crash
This commit is contained in:
parent
6ac98c0324
commit
df2731bc2c
@ -1275,7 +1275,10 @@ void ClientLobby::addSpectateHelperMessage() const
|
|||||||
auto& local_players = NetworkConfig::get()->getNetworkPlayers();
|
auto& local_players = NetworkConfig::get()->getNetworkPlayers();
|
||||||
if (local_players.empty())
|
if (local_players.empty())
|
||||||
return;
|
return;
|
||||||
DeviceConfig* dc = std::get<0>(local_players[0])->getConfiguration();
|
InputDevice* id = std::get<0>(local_players[0]);
|
||||||
|
if (!id)
|
||||||
|
return;
|
||||||
|
DeviceConfig* dc = id->getConfiguration();
|
||||||
if (!dc)
|
if (!dc)
|
||||||
return;
|
return;
|
||||||
core::stringw left = dc->getBindingAsString(PA_STEER_LEFT);
|
core::stringw left = dc->getBindingAsString(PA_STEER_LEFT);
|
||||||
|
Loading…
Reference in New Issue
Block a user