gdi32: Add check for null pointer in SetDIBitsToDevice.
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index 7b9ef6d..86e1308 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -364,6 +364,8 @@
     INT ret;
     DC *dc;
 
+    if (!bits) return 0;
+
     if (!(dc = DC_GetDCUpdate( hdc ))) return 0;
 
     if(dc->funcs->pSetDIBitsToDevice)