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

This commit is contained in:
Henri Verbeet 2011-11-23 08:51:42 +01:00 committed by Alexandre Julliard
parent a8504f4f57
commit 08e8b0a70a

View file

@ -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)