Commit f817fb56 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: Avoid a crash in GdipDrawImagePointRect.

parent 147d4bc8
...@@ -3053,6 +3053,8 @@ GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image, ...@@ -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); 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 = units_scale(srcUnit, graphics->unit, graphics->xres);
scale_x *= graphics->xres / image->xres; scale_x *= graphics->xres / image->xres;
scale_y = units_scale(srcUnit, graphics->unit, graphics->yres); scale_y = units_scale(srcUnit, graphics->unit, graphics->yres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment