On Tue, 8 Jun 2021 at 17:08, Nikolay Sivov nsivov@codeweavers.com wrote:
if (!refcount) {
ID3D11Device2_Release(&context->device->ID3D11Device2_iface); if (context->type != D3D11_DEVICE_CONTEXT_IMMEDIATE) { wined3d_deferred_context_destroy(context->wined3d_context); d3d11_device_context_cleanup(context); heap_free(context); }
}ID3D11Device2_Release(&context->device->ID3D11Device2_iface);
That's not much better though; in case of an immediate context, "context" may be freed by releasing the device reference.