1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:12:56 +08:00

Remove unnecessary null pre-checks

This commit is contained in:
Dean Herbert 2022-08-16 15:36:43 +09:00
parent e636fcd9b8
commit ecb9351bab

View File

@ -348,10 +348,10 @@ namespace osu.Game.Rulesets.Osu.Edit
private void mergeSelection()
{
if (EditorBeatmap == null || ChangeHandler == null || selectedMergeableObjects.Length < 2)
if (selectedMergeableObjects.Length < 2)
return;
ChangeHandler.BeginChange();
ChangeHandler?.BeginChange();
// Have an initial slider object.
var firstHitObject = selectedMergeableObjects[0];
@ -426,7 +426,7 @@ namespace osu.Game.Rulesets.Osu.Edit
SelectedItems.Clear();
SelectedItems.Add(mergedHitObject);
ChangeHandler.EndChange();
ChangeHandler?.EndChange();
}
protected override IEnumerable<MenuItem> GetContextMenuItemsForSelection(IEnumerable<SelectionBlueprint<HitObject>> selection)