Henri Verbeet : wined3d: Don' t return a surface for a NULL dc in wined3d_device_get_surface_from_dc().
Module: wine Branch: master Commit: 08e8b0a70a13b8914155f95c8d21163d91eb2a67 URL: http://source.winehq.org/git/wine.git/?a=commit;h=08e8b0a70a13b8914155f95c8d... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Nov 23 08:51:42 2011 +0100 wined3d: Don't return a surface for a NULL dc in wined3d_device_get_surface_from_dc(). --- dlls/wined3d/device.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7e70841..db849a4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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)
participants (1)
-
Alexandre Julliard