windowscodecs: Add a NULL check to 8bpp gray converter.

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 2019-02-01 16:47:22 +08:00 committed by Alexandre Julliard
parent d6c2734d72
commit 453aa45980
1 changed files with 3 additions and 0 deletions

View File

@ -1186,6 +1186,9 @@ static HRESULT copypixels_to_8bppGray(struct FormatConverter *This, const WICRec
return hr;
}
if (!prc)
return copypixels_to_24bppBGR(This, NULL, cbStride, cbBufferSize, pbBuffer, source_format);
srcstride = 3 * prc->Width;
srcdatasize = srcstride * prc->Height;