Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/Vulkan-Loader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--loader/loader.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 84031dfb4..00a0273da 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -4307,9 +4307,12 @@ VKAPI_ATTR void VKAPI_CALL loader_layer_destroy_device(VkDevice device, const Vk
const struct loader_instance *inst = icd_term->this_instance;
destroyFunction(device, pAllocator);
- dev->chain_device = NULL;
- dev->icd_device = NULL;
- loader_remove_logical_device(inst, icd_term, dev, pAllocator);
+ if (NULL != dev)
+ {
+ dev->chain_device = NULL;
+ dev->icd_device = NULL;
+ loader_remove_logical_device(inst, icd_term, dev, pAllocator);
+ }
}
// Given the list of layers to activate in the loader_instance