mirror of
https://github.com/osukey/osukey.git
synced 2025-06-27 14:18: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)
|
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
|
||||||
return DefaultBeatmap;
|
return DefaultBeatmap;
|
||||||
|
|
||||||
if (beatmapInfo.Metadata == null)
|
|
||||||
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
|
|
||||||
|
|
||||||
var info = beatmapInfo;
|
var info = beatmapInfo;
|
||||||
beatmapInfo = QueryBeatmap(p => info.OnlineBeatmapID == p.OnlineBeatmapID) ?? 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);
|
WorkingBeatmap working = new BeatmapManagerWorkingBeatmap(Files.Store, new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager);
|
||||||
|
|
||||||
previous?.TransferTo(working);
|
previous?.TransferTo(working);
|
||||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
else if (fallback && localBeatmap.BeatmapInfo.ID != 0)
|
else if (fallback && localBeatmap.BeatmapInfo.ID != 0)
|
||||||
{
|
{
|
||||||
// Fall back to local background if one exists
|
// Fall back to local background if one exists
|
||||||
drawable = new BeatmapBackgroundSprite(beatmaps.GetWorkingBeatmap(model));
|
drawable = new BeatmapBackgroundSprite(localBeatmap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user