[09/10] windowscodecs: Add a NULL check to GetFrameCount of the TGA decoder.

Dmitry Timoshkov dmitry at baikal.ru
Thu Nov 22 21:50:20 CST 2012


---
 dlls/windowscodecs/tgaformat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c
index eac3406..1c39fa7 100644
--- a/dlls/windowscodecs/tgaformat.c
+++ b/dlls/windowscodecs/tgaformat.c
@@ -405,6 +405,8 @@ static HRESULT WINAPI TgaDecoder_GetThumbnail(IWICBitmapDecoder *iface,
 static HRESULT WINAPI TgaDecoder_GetFrameCount(IWICBitmapDecoder *iface,
     UINT *pCount)
 {
+    if (!pCount) return E_INVALIDARG;
+
     *pCount = 1;
     return S_OK;
 }
-- 
1.7.12.4




More information about the wine-patches mailing list