From 33ef8688ab91c33840825f7d95a6c361b418ff82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 20 Oct 2016 16:38:04 +0200 Subject: [PATCH] libs/vkd3d: Initialize "resource->external" before possible call to d3d12_resource_destroy(). --- libs/vkd3d/resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 5562d4f7..6ce09e91 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -654,6 +654,8 @@ static HRESULT d3d12_committed_resource_init(struct d3d12_resource *resource, st if (optimized_clear_value) FIXME("Ignoring optimized clear value.\n"); + resource->external = false; + switch (desc->Dimension) { case D3D12_RESOURCE_DIMENSION_BUFFER: @@ -685,7 +687,6 @@ static HRESULT d3d12_committed_resource_init(struct d3d12_resource *resource, st return E_INVALIDARG; } - resource->external = false; resource->map_count = 0; resource->map_data = NULL;