diff --git a/Source/Engine/UI/UIControl.cs b/Source/Engine/UI/UIControl.cs index 89563a21a..75569ebcc 100644 --- a/Source/Engine/UI/UIControl.cs +++ b/Source/Engine/UI/UIControl.cs @@ -299,6 +299,8 @@ namespace FlaxEngine private void OnControlLocationChanged(Control control) { + if (control == null || !this) + return; _blockEvents = true; LocalPosition = new Vector3(control.Location, LocalPosition.Z); _blockEvents = false;