Merge pull request #1485 from DrPandemic/fix-skia-segfault

Fix skia segfault
This commit is contained in:
dkanada 2019-06-25 12:44:29 -05:00 committed by GitHub
commit 3c16c34386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -23,8 +23,9 @@
- [fruhnow](https://github.com/fruhnow)
- [Lynxy](https://github.com/Lynxy)
- [fasheng](https://github.com/fasheng)
- [ploughpuff](https://github.com/ploughpuff)
- [ploughpuff](https://github.com/ploughpuff)
- [pjeanjean](https://github.com/pjeanjean)
- [DrPandemic](https://github.com/drpandemic)
# Emby Contributors

View file

@ -185,6 +185,11 @@ namespace Jellyfin.Drawing.Skia
public ImageDimensions GetImageSize(string path)
{
if (!File.Exists(path))
{
throw new FileNotFoundException("File not found", path);
}
using (var s = new SKFileStream(path))
using (var codec = SKCodec.Create(s))
{