[PATCH 2/2] windowscodecs: Add a NULL check to 8bpp gray converter.

Dmitry Timoshkov dmitry at baikal.ru
Fri Feb 1 02:47:22 CST 2019


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/windowscodecs/converter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c
index d6b62a60bb..5288a32d13 100644
--- a/dlls/windowscodecs/converter.c
+++ b/dlls/windowscodecs/converter.c
@@ -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;
 
-- 
2.20.1




More information about the wine-devel mailing list