diff --git a/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs index 231b09219d..06b46b4a24 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs @@ -43,7 +43,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic this.modData = modData; this.onSelect = onSelect; - var approving = new Action(() => { Ui.CloseWindow(); onSelect(selectedUid); }); + var approving = new Action(() => + { + Ui.CloseWindow(); + onSelect?.Invoke(selectedUid); + }); + var canceling = new Action(() => { Ui.CloseWindow(); onExit(); }); var okButton = widget.Get("BUTTON_OK");