Browse Source

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

pull/442/head
Dirk Lemstra 9 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; return image;
} }
finally finally

Loading…
Cancel
Save