From 2798f0d8414bb833459fa54c810ca346819c8e34 Mon Sep 17 00:00:00 2001 From: Igor Popov Date: Thu, 7 Jun 2012 18:19:20 +0400 Subject: [PATCH] dedicated: handle non-existing map --- OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index efede1ed21..41279e4b95 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -253,6 +253,11 @@ namespace OpenRA.Mods.RA.Server server.SendChatTo( conn, "Only the host can change the map" ); return true; } + if(!server.ModData.AvailableMaps.ContainsKey(s)) + { + server.SendChatTo( conn, "Map not found"); + return true; + } server.lobbyInfo.GlobalSettings.Map = s; var oldSlots = server.lobbyInfo.Slots.Keys.ToArray(); LoadMap(server);