From d711728a7e55daacbaabdebec60bbb88c8d4e580 Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Mon, 7 May 2007 21:03:16 +0100 Subject: [PATCH] gdi32: Add check for null pointer in SetDIBitsToDevice. --- dlls/gdi32/dib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 7b9ef6d9bf9..86e13080e13 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -364,6 +364,8 @@ INT WINAPI SetDIBitsToDevice(HDC hdc, INT xDest, INT yDest, DWORD cx, INT ret; DC *dc; + if (!bits) return 0; + if (!(dc = DC_GetDCUpdate( hdc ))) return 0; if(dc->funcs->pSetDIBitsToDevice)