[PATCH] wined3d: Clean up lights in wined3d_stateblock_cleanup().
Zebediah Figura
z.figura12 at gmail.com
Sun Mar 24 11:32:43 CDT 2019
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46829
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/wined3d/stateblock.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 7495d217c4..e9c1fe2374 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)
--
2.17.1
More information about the wine-devel
mailing list