Fix a crash when there is no briefing text

This commit is contained in:
abcdefg30
2022-07-19 19:45:30 +02:00
committed by Smittytron
parent e00887e4e1
commit 4435bdec3c
2 changed files with 2 additions and 2 deletions

View File

@@ -234,7 +234,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
infoVideo = missionData.BackgroundVideo;
infoVideoVisible = infoVideo != null;
var briefing = WidgetUtils.WrapText(missionData.Briefing.Replace("\\n", "\n"), description.Bounds.Width, descriptionFont);
var briefing = WidgetUtils.WrapText(missionData.Briefing?.Replace("\\n", "\n"), description.Bounds.Width, descriptionFont);
var height = descriptionFont.Measure(briefing).Y;
Game.RunAfterTick(() =>
{