mirror of
https://github.com/osukey/osukey.git
synced 2025-06-27 06:08:06 +09:00
Fix metadata potentially being null
This commit is contained in:
parent
166a8c8bbb
commit
52558c5cf6
@ -260,12 +260,12 @@ namespace osu.Game.Beatmaps
|
||||
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
|
||||
return DefaultBeatmap;
|
||||
|
||||
if (beatmapInfo.Metadata == null)
|
||||
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
|
||||
|
||||
var info = beatmapInfo;
|
||||
beatmapInfo = QueryBeatmap(p => info.OnlineBeatmapID == p.OnlineBeatmapID) ?? beatmapInfo;
|
||||
|
||||
if (beatmapInfo.Metadata == null)
|
||||
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
|
||||
|
||||
WorkingBeatmap working = new BeatmapManagerWorkingBeatmap(Files.Store, new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager);
|
||||
|
||||
previous?.TransferTo(working);
|
||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
else if (fallback && localBeatmap.BeatmapInfo.ID != 0)
|
||||
{
|
||||
// Fall back to local background if one exists
|
||||
drawable = new BeatmapBackgroundSprite(beatmaps.GetWorkingBeatmap(model));
|
||||
drawable = new BeatmapBackgroundSprite(localBeatmap);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user