windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not initialized case in the GIF decoder.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2020-04-27 10:32:38 +08:00 committed by Alexandre Julliard
parent 7eb1f5d6ad
commit 18a915ef3c
1 changed files with 3 additions and 0 deletions

View File

@ -1187,6 +1187,9 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet
TRACE("(%p,%p)\n", iface, palette);
if (!This->gif)
return WINCODEC_ERR_WRONGSTATE;
cm = This->gif->SColorMap;
if (cm)
{