From 677ea5661a0282be0247c9cb29f0ace98873ccd6 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Tue, 3 Mar 2009 16:07:29 -0600 Subject: [PATCH] gdiplus: return a NULL bitmap when GdipCreateBitmapFromScan0 fails --- dlls/gdiplus/image.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index a229f8b..5dab53e 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -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; } -- 1.5.4.3