Browse Source

Fix nullref

the quantizier was initialized with default --> all properties are null. So we need to check that
pull/2338/head
Stefan Nikolei 4 years ago
parent
commit
df803cd34d
  1. 3
      src/ImageSharp/Formats/Gif/GifEncoderCore.cs

3
src/ImageSharp/Formats/Gif/GifEncoderCore.cs

@ -171,8 +171,11 @@ internal sealed class GifEncoderCore : IImageEncoderInternals
quantized = null; quantized = null;
} }
if (hasPaletteQuantizer)
{
paletteQuantizer.Dispose(); paletteQuantizer.Dispose();
} }
}
private void EncodeFrame<TPixel>( private void EncodeFrame<TPixel>(
Stream stream, Stream stream,

Loading…
Cancel
Save