mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix segfault when loading network game with unknown objects
This oneliner causes the game not to crash, when connecting to a network game that utilizes objects, that the connecting client doesn't have installed. Instead, it quits to the main menu with an error message being displayed.
This commit is contained in:
parent
7e21ef7ca4
commit
5d69eda3da
|
@ -1716,6 +1716,12 @@ void Network::Client_Handle_MAP(NetworkConnection& connection, NetworkPacket& pa
|
||||||
// window_network_status_open("Loaded new map from network");
|
// window_network_status_open("Loaded new map from network");
|
||||||
_desynchronised = false;
|
_desynchronised = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Something went wrong, game is not loaded. Return to main screen.
|
||||||
|
game_do_command(0, GAME_COMMAND_FLAG_APPLY, 0, 0, GAME_COMMAND_LOAD_OR_QUIT, 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
SDL_RWclose(rw);
|
SDL_RWclose(rw);
|
||||||
if (has_to_free)
|
if (has_to_free)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue