Commit 564170cb authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

wined3d: Shutdown CS thread before deallocating resources.

parent 6f11fd97
...@@ -2561,10 +2561,6 @@ fail: ...@@ -2561,10 +2561,6 @@ fail:
void wined3d_cs_destroy(struct wined3d_cs *cs) 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) if (cs->thread)
{ {
wined3d_cs_emit_stop(cs); wined3d_cs_emit_stop(cs);
...@@ -2573,5 +2569,8 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) ...@@ -2573,5 +2569,8 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
ERR("Closing event failed.\n"); 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); HeapFree(GetProcessHeap(), 0, cs);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment