Fix incorrect realm access after new beatmap import

This commit is contained in:
Dean Herbert 2022-01-11 16:30:55 +09:00
parent 64a47ff850
commit 8c3dc4333d

View File

@ -97,9 +97,12 @@ namespace osu.Game.Beatmaps
}
};
var imported = beatmapModelManager.Import(set).GetResultSafely()?.Value;
var imported = beatmapModelManager.Import(set).GetResultSafely();
return GetWorkingBeatmap(imported?.Beatmaps.First());
if (imported == null)
throw new InvalidOperationException("Failed to import new beatmap");
return imported.PerformRead(s => GetWorkingBeatmap(s.Beatmaps.First()));
}
/// <summary>