[PATCH 3/5] ddraw: Don't enumerate surfaces without references.
Henri Verbeet
hverbeet at codeweavers.com
Mon Dec 5 15:06:55 CST 2011
---
dlls/ddraw/ddraw.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 03d8b1c..b344b81 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -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);
--
1.7.3.4
More information about the wine-patches
mailing list