mirror of
https://github.com/ppy/osu.git
synced 2026-06-02 16:20:30 +08:00
Fix skin potentially being lost when opening and closing skin editor rapidly
This commit is contained in:
@@ -47,7 +47,7 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
|
||||
protected override bool StartHidden => true;
|
||||
|
||||
private Drawable targetScreen = null!;
|
||||
private Drawable? targetScreen;
|
||||
|
||||
private OsuTextFlowContainer headerText = null!;
|
||||
|
||||
@@ -541,8 +541,14 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
if (!hasBegunMutating)
|
||||
return;
|
||||
|
||||
if (targetScreen?.IsLoaded != true)
|
||||
return;
|
||||
|
||||
SkinComponentsContainer[] targetContainers = availableTargets.ToArray();
|
||||
|
||||
if (!targetContainers.All(c => c.ComponentsLoaded))
|
||||
return;
|
||||
|
||||
foreach (var t in targetContainers)
|
||||
currentSkin.Value.UpdateDrawableTarget(t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user