Fix possible crashes in the MapChooserLogic

This commit is contained in:
abcdefg30
2015-09-24 16:57:03 +02:00
parent cdd4590ece
commit e989ce2ef2

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);