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

Alexandre Julliard julliard at winehq.org
Mon Feb 4 13:29:53 CST 2019


Module: wine
Branch: master
Commit: 453aa459803fbdbf09fa1e4c66ec6d73271711f2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=453aa459803fbdbf09fa1e4c66ec6d73271711f2

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Feb  1 16:47:22 2019 +0800

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

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/windowscodecs/converter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c
index d6b62a6..5288a32 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;
 




More information about the wine-cvs mailing list