Merge pull request #9425 from abcdefg30/chosecrash

Fix possible crashes in the MapChooserLogic
This commit is contained in:
Pavel Penev
2015-09-25 12:38:57 +03:00

View File

@@ -207,8 +207,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var maps = tabMaps[tab]
.Where(m => gameMode == null || m.Type == gameMode)
.Where(m => mapFilter == null ||
m.Title.IndexOf(mapFilter, StringComparison.OrdinalIgnoreCase) >= 0 ||
m.Author.IndexOf(mapFilter, StringComparison.OrdinalIgnoreCase) >= 0 ||
(m.Title != null && m.Title.IndexOf(mapFilter, StringComparison.OrdinalIgnoreCase) >= 0) ||
(m.Author != null && m.Author.IndexOf(mapFilter, StringComparison.OrdinalIgnoreCase) >= 0) ||
m.PlayerCount == playerCountFilter)
.OrderBy(m => m.PlayerCount)
.ThenBy(m => m.Title);