Merge pull request #8255 from Mailaender/maptitle-nre

Fixed a NullReferenceException when not using the optional MAP LabelWidget
This commit is contained in:
abcdefg30
2015-05-25 17:04:42 +02:00

View File

@@ -221,7 +221,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
var maptitle = item.GetOrNull<LabelWidget>("MAP");
if (title != null)
if (maptitle != null)
{
maptitle.GetText = () => map.Title;
maptitle.GetColor = () => !compatible ? Color.DarkGray : !canJoin ? Color.LightGray : maptitle.TextColor;