Browse Source

Throw exception when the image does not contain a data chunk (#441).

pull/442/head
Dirk Lemstra 8 years ago
parent
commit
727a9bcd16
  1. 5
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

5
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -269,6 +269,11 @@ namespace SixLabors.ImageSharp.Formats.Png
}
}
if (image == null)
{
throw new ImageFormatException("PNG Image does not contain a data chunk");
}
return image;
}
finally

Loading…
Cancel
Save