gdiplus: Avoid a crash in GdipDrawImagePointRect.
This commit is contained in:
parent
147d4bc88a
commit
f817fb56e8
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue