gdiplus: Return a NULL bitmap when GdipCreateBitmapFromScan0 fails.

This commit is contained in:
Vincent Povirk 2009-03-03 16:07:29 -06:00 committed by Alexandre Julliard
parent abbf38ccd9
commit 3db77ce50b
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}