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 3 years ago
parent
commit
df803cd34d
  1. 5
      src/ImageSharp/Formats/Gif/GifEncoderCore.cs

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

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

Loading…
Cancel
Save