wined3d: Always pass a non-NULL rectangle to surface_color_fill() in wined3d_device_color_fill().
This commit is contained in:
parent
831801dd60
commit
7e8e7ecebb
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue