Commit 08e8b0a7 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Don't return a surface for a NULL dc in wined3d_device_get_surface_from_dc().

parent a8504f4f
......@@ -5871,6 +5871,9 @@ HRESULT CDECL wined3d_device_get_surface_from_dc(const struct wined3d_device *de
TRACE("device %p, dc %p, surface %p.\n", device, dc, surface);
if (!dc)
return WINED3DERR_INVALIDCALL;
LIST_FOR_EACH_ENTRY(resource, &device->resources, struct wined3d_resource, resource_list_entry)
{
if (resource->resourceType == WINED3DRTYPE_SURFACE)
......
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