mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Fix skin potentially being lost when opening and closing skin editor rapidly
This commit is contained in:
parent
0e41d0c9cf
commit
cd02d00c03
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user