[1/3] windowscodecs: GetThumbnail of the PNG decoder should return NULL interface.

Dmitry Timoshkov dmitry at baikal.ru
Sun Dec 9 21:44:12 CST 2012


Just like TIFF decoder does.
---
 dlls/windowscodecs/pngformat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c
index 009532d..051c60c 100644
--- a/dlls/windowscodecs/pngformat.c
+++ b/dlls/windowscodecs/pngformat.c
@@ -645,6 +645,10 @@ static HRESULT WINAPI PngDecoder_GetThumbnail(IWICBitmapDecoder *iface,
     IWICBitmapSource **ppIThumbnail)
 {
     TRACE("(%p,%p)\n", iface, ppIThumbnail);
+
+    if (!ppIThumbnail) return E_INVALIDARG;
+
+    *ppIThumbnail = NULL;
     return WINCODEC_ERR_CODECNOTHUMBNAIL;
 }
 
-- 
1.8.0.1




More information about the wine-patches mailing list