mirror of
https://github.com/ppy/osu
synced 2025-01-04 13:22:08 +00:00
Always return a non-null container for SkinComponentsContainerLookup
s
This commit is contained in:
parent
4cc6664dc7
commit
9685fb2114
@ -347,7 +347,7 @@ namespace osu.Game.Skinning
|
||||
switch (containerLookup.Target)
|
||||
{
|
||||
case SkinComponentsContainerLookup.TargetArea.MainHUDComponents:
|
||||
var skinnableTargetWrapper = new DefaultSkinComponentsContainer(container =>
|
||||
return new DefaultSkinComponentsContainer(container =>
|
||||
{
|
||||
var score = container.OfType<LegacyScoreCounter>().FirstOrDefault();
|
||||
var accuracy = container.OfType<GameplayAccuracyCounter>().FirstOrDefault();
|
||||
@ -387,8 +387,6 @@ namespace osu.Game.Skinning
|
||||
new BarHitErrorMeter(),
|
||||
}
|
||||
};
|
||||
|
||||
return skinnableTargetWrapper;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -66,10 +66,10 @@ namespace osu.Game.Skinning
|
||||
components.Clear();
|
||||
ComponentsLoaded = false;
|
||||
|
||||
if (componentsContainer == null)
|
||||
return;
|
||||
|
||||
content = componentsContainer;
|
||||
content = componentsContainer ?? new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
};
|
||||
|
||||
cancellationSource?.Cancel();
|
||||
cancellationSource = null;
|
||||
|
Loading…
Reference in New Issue
Block a user