Module: wine Branch: master Commit: cc5c9e8dff4840769a6cddda890cbfdd666bf830 URL: https://source.winehq.org/git/wine.git/?a=commit;h=cc5c9e8dff4840769a6cddda8...
Author: Zebediah Figura z.figura12@gmail.com Date: Sun Mar 24 11:32:43 2019 -0500
wined3d: Clean up lights in wined3d_stateblock_cleanup().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46829 Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/stateblock.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index ee552c1..38f124c 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -523,6 +523,7 @@ void state_unbind_resources(struct wined3d_state *state)
void wined3d_stateblock_state_cleanup(struct wined3d_stateblock_state *state) { + struct wined3d_light_info *light, *cursor; struct wined3d_vertex_declaration *decl; struct wined3d_texture *texture; struct wined3d_buffer *buffer; @@ -570,6 +571,15 @@ void wined3d_stateblock_state_cleanup(struct wined3d_stateblock_state *state) wined3d_texture_decref(texture); } } + + for (i = 0; i < LIGHTMAP_SIZE; ++i) + { + LIST_FOR_EACH_ENTRY_SAFE(light, cursor, &state->light_state.light_map[i], struct wined3d_light_info, entry) + { + list_remove(&light->entry); + heap_free(light); + } + } }
void state_cleanup(struct wined3d_state *state)