Vincent Povirk : gdiplus: Return a NULL bitmap when GdipCreateBitmapFromScan0 fails.

Alexandre Julliard julliard at winehq.org
Thu Mar 5 10:31:12 CST 2009


Module: wine
Branch: master
Commit: 3db77ce50b9dfa811966afe15604ce2ee3e20c8e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3db77ce50b9dfa811966afe15604ce2ee3e20c8e

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Tue Mar  3 16:07:29 2009 -0600

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




More information about the wine-cvs mailing list