From e989ce2ef2348c8146be4f1bddf0645a319510ff Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 24 Sep 2015 16:57:03 +0200 Subject: [PATCH] Fix possible crashes in the MapChooserLogic --- OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs index 0e6dbcfbcf..0a2e3ea3c9 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs @@ -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);