gdi32: check for null-pointer in CreateDIBSection

Louis. Lenders xerox_xerox2000 at yahoo.co.uk
Sat May 19 17:55:17 CDT 2007


Skipped content of type multipart/alternative-------------- next part --------------
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index 86e1308..e4c4d7e 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -1224,6 +1224,8 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
     WORD planes, bpp;
     DWORD compression, sizeImage;
     void *mapBits = NULL;
+    
+    if(!bmi) return 0;
 
     if (((bitmap_type = DIB_GetBitmapInfo( &bmi->bmiHeader, &width, &height,
                                            &planes, &bpp, &compression, &sizeImage )) == -1))


More information about the wine-patches mailing list