Issue #18936: The game no longer crashes when TextFieldWidget sends Enter key press and onSelect action is null.
This commit is contained in:
committed by
Matthias Mailänder
parent
b44a9ab5fc
commit
b3f39bffce
@@ -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<ButtonWidget>("BUTTON_OK");
|
||||
|
||||
Reference in New Issue
Block a user