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:
parent
e636fcd9b8
commit
ecb9351bab
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user