[PATCH 1/6] wined3d: Verify state representatives represent themselves.

Henri Verbeet hverbeet at codeweavers.com
Thu Apr 1 14:28:50 CDT 2010


This ensures there's no multilevel indirection in the state table.
---
 dlls/wined3d/state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index ddf4f77..893e0ed 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -5665,7 +5665,7 @@ static void validate_state_table(struct StateEntry *state_table)
         DWORD rep = state_table[i].representative;
         if (rep)
         {
-            if (!state_table[rep].representative)
+            if (state_table[rep].representative != rep)
             {
                 ERR("State %s (%#x) has invalid representative %s (%#x).\n",
                         debug_d3dstate(i), i, debug_d3dstate(rep), rep);
-- 
1.6.4.4




More information about the wine-patches mailing list