From 7e8e7ecebb2b2574cf185fa92e171844efe895bb Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 4 Aug 2011 19:53:29 +0200 Subject: [PATCH] wined3d: Always pass a non-NULL rectangle to surface_color_fill() in wined3d_device_color_fill(). --- dlls/wined3d/device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 19aa3d029e2..ee08b7d3d4d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4981,6 +4981,8 @@ HRESULT CDECL wined3d_device_delete_patch(struct wined3d_device *device, UINT ha HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device, struct wined3d_surface *surface, const RECT *rect, const WINED3DCOLORVALUE *color) { + RECT r; + TRACE("device %p, surface %p, rect %s, color {%.8e, %.8e, %.8e, %.8e}.\n", device, surface, wine_dbgstr_rect(rect), color->r, color->g, color->b, color->a); @@ -4991,6 +4993,12 @@ HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device, return WINED3DERR_INVALIDCALL; } + if (!rect) + { + SetRect(&r, 0, 0, surface->resource.width, surface->resource.height); + rect = &r; + } + return surface_color_fill(surface, rect, color); }