gdiplus: Return a NULL bitmap when GdipCreateBitmapFromScan0 fails.
This commit is contained in:
parent
abbf38ccd9
commit
3db77ce50b
|
@ -549,6 +549,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
|
|||
ERR("could not make stream\n");
|
||||
GdipFree(*bitmap);
|
||||
GdipFree(buff);
|
||||
*bitmap = NULL;
|
||||
return GenericError;
|
||||
}
|
||||
|
||||
|
@ -558,6 +559,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
|
|||
IStream_Release(stream);
|
||||
GdipFree(*bitmap);
|
||||
GdipFree(buff);
|
||||
*bitmap = NULL;
|
||||
return GenericError;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue