Add null check on stream

This commit is contained in:
Dean Herbert 2017-07-18 16:16:01 +09:00
parent f00140f0a4
commit 6f59e5feec

View File

@ -15,7 +15,7 @@ namespace osu.Game.Beatmaps.IO
AddReader<OszArchiveReader>((storage, path) => AddReader<OszArchiveReader>((storage, path) =>
{ {
using (var stream = storage.GetStream(path)) using (var stream = storage.GetStream(path))
return ZipFile.IsZipFile(stream, false); return stream != null && ZipFile.IsZipFile(stream, false);
}); });
OsuLegacyDecoder.Register(); OsuLegacyDecoder.Register();
} }