Merge pull request #36401 from peppy/fix-skin-save-crash

Fix skin saving crashing if hashable files are not present
This commit is contained in:
Bartłomiej Dach
2026-01-20 11:04:23 +01:00
committed by GitHub

View File

@@ -474,8 +474,10 @@ namespace osu.Game.Database
foreach (RealmNamedFileUsage file in item.Files.Where(f => HashableFileTypes.Any(ext => f.Filename.EndsWith(ext, StringComparison.OrdinalIgnoreCase))).OrderBy(f => f.Filename))
{
using (Stream s = Files.Store.GetStream(file.File.GetStoragePath()))
s.CopyTo(hashable);
using (Stream? s = Files.Store.GetStream(file.File.GetStoragePath()))
{
s?.CopyTo(hashable);
}
}
if (hashable.Length > 0)