This fixes the following scenario Function image.c:decode_frame_wic IWICBitmapSource_GetSize returns S_OK GdipCreateBitmapFromScan0 returns OutOfMemory Attempts to acess bitmap which GdipCreateBitmapFromScan0 didn't return.
Also, this makes all the if conditions consistent.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/gdiplus/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 1966401507..354801348e 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -3683,7 +3683,7 @@ static GpStatus decode_frame_wic(IWICBitmapDecoder *decoder, BOOL force_conversi IWICBitmapSource_Release(source); }
- if (SUCCEEDED(hr)) { + if (SUCCEEDED(hr) && status == Ok) { bitmap->metadata_reader = NULL;
if (metadata_reader)