From: Dmitry Timoshkov Subject: gdiplus: Avoid a crash in GdipDrawImagePointRect. Message-Id: <20130218212912.71360f43.dmitry@baikal.ru> Date: Mon, 18 Feb 2013 21:29:12 +0800 --- dlls/gdiplus/graphics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 659c46b..4a5b004 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -3053,6 +3053,8 @@ GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image, TRACE("(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit); + if (!graphics || !image) return InvalidParameter; + scale_x = units_scale(srcUnit, graphics->unit, graphics->xres); scale_x *= graphics->xres / image->xres; scale_y = units_scale(srcUnit, graphics->unit, graphics->yres); -- 1.8.1.3