ddraw: Don't enumerate surfaces without references.

This commit is contained in:
Henri Verbeet 2011-12-05 22:06:55 +01:00 committed by Alexandre Julliard
parent 107369d018
commit 6523ef5f67

View file

@ -3422,6 +3422,13 @@ static HRESULT WINAPI ddraw7_EnumSurfaces(IDirectDraw7 *iface, DWORD Flags,
LIST_FOR_EACH_SAFE(entry, entry2, &This->surface_list)
{
surf = LIST_ENTRY(entry, IDirectDrawSurfaceImpl, surface_list_entry);
if (!surf->iface_count)
{
WARN("Not enumerating surface %p because it doesn't have any references.\n", surf);
continue;
}
if (all || (nomatch != ddraw_match_surface_desc(DDSD, &surf->surface_desc)))
{
TRACE("Enumerating surface %p.\n", surf);