Commit c4e859a6 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

gdiplus: Avoid dereferencing a potential NULL (Coverity 589).

parent 8ed05aeb
......@@ -450,7 +450,9 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
TRACE("%d %d %d %d %p %p\n", width, height, stride, format, scan0, bitmap);
if(!bitmap || width <= 0 || height <= 0 || (scan0 && (stride % 4))){
if (!bitmap) return InvalidParameter;
if(width <= 0 || height <= 0 || (scan0 && (stride % 4))){
*bitmap = NULL;
return InvalidParameter;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment