wined3d: Shutdown CS thread before deallocating resources.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2017-05-10 20:00:43 +02:00 committed by Alexandre Julliard
parent 6f11fd9728
commit 564170cbd0
1 changed files with 3 additions and 4 deletions

View File

@ -2561,10 +2561,6 @@ fail:
void wined3d_cs_destroy(struct wined3d_cs *cs)
{
state_cleanup(&cs->state);
HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
HeapFree(GetProcessHeap(), 0, cs->data);
if (cs->thread)
{
wined3d_cs_emit_stop(cs);
@ -2573,5 +2569,8 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
ERR("Closing event failed.\n");
}
state_cleanup(&cs->state);
HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
HeapFree(GetProcessHeap(), 0, cs->data);
HeapFree(GetProcessHeap(), 0, cs);
}