From 3a90aa0b9b9ccb909616a9c828c9c0fdaeb845a3 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 8 Jun 2022 17:57:59 +0900 Subject: [PATCH] Fix code styling --- osu.Game/Overlays/Settings/Sections/SkinSection.cs | 3 +-- osu.Game/Screens/Select/SkinDeleteDialog.cs | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Settings/Sections/SkinSection.cs b/osu.Game/Overlays/Settings/Sections/SkinSection.cs index e9713ad507..b83600a16d 100644 --- a/osu.Game/Overlays/Settings/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Settings/Sections/SkinSection.cs @@ -232,8 +232,7 @@ namespace osu.Game.Overlays.Settings.Sections private void delete() { - if (dialogOverlay != null) - dialogOverlay.Push(new SkinDeleteDialog(currentSkin.Value)); + dialogOverlay?.Push(new SkinDeleteDialog(currentSkin.Value)); } } } diff --git a/osu.Game/Screens/Select/SkinDeleteDialog.cs b/osu.Game/Screens/Select/SkinDeleteDialog.cs index a971cca401..c7c36fb92c 100644 --- a/osu.Game/Screens/Select/SkinDeleteDialog.cs +++ b/osu.Game/Screens/Select/SkinDeleteDialog.cs @@ -32,7 +32,11 @@ namespace osu.Game.Screens.Select new PopupDialogDangerousButton { Text = @"Yes. Totally. Delete it.", - Action = () => { + Action = () => + { + if (manager == null) + return; + manager.Delete(s); manager.CurrentSkinInfo.Value = DefaultSkin.CreateInfo().ToLiveUnmanaged(); },