Joachim Priesner : wined3d: Clear active lights when cleaning up a D3D stateblock.
Alexandre Julliard
julliard at winehq.org
Fri May 9 13:32:36 CDT 2014
Module: wine
Branch: master
Commit: 3cd86c9f62cfb800164068a2cb8a77b65ef6d9bc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3cd86c9f62cfb800164068a2cb8a77b65ef6d9bc
Author: Joachim Priesner <joachim.priesner at web.de>
Date: Thu May 8 22:43:46 2014 +0200
wined3d: Clear active lights when cleaning up a D3D stateblock.
This prevents dangling pointers as the light structures that the pointers in
the state->lights array point to are freed below when cleaning the light maps.
---
dlls/wined3d/stateblock.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index f991362..e98ee2a 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -539,6 +539,11 @@ void state_cleanup(struct wined3d_state *state)
if (!(state->flags & WINED3D_STATE_NO_REF))
state_unbind_resources(state);
+ for (counter = 0; counter < MAX_ACTIVE_LIGHTS; ++counter)
+ {
+ state->lights[counter] = NULL;
+ }
+
for (counter = 0; counter < LIGHTMAP_SIZE; ++counter)
{
struct list *e1, *e2;
More information about the wine-cvs
mailing list