diff options
-rw-r--r-- | loader/loader.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/loader/loader.c b/loader/loader.c index c14aace8..2566c950 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -644,7 +644,8 @@ VkResult loader_init_generic_list(const struct loader_instance *inst, struct loa } void loader_destroy_generic_list(const struct loader_instance *inst, struct loader_generic_list *list) { - loader_instance_heap_free(inst, list->list); + if (list->count !=0) + loader_instance_heap_free(inst, list->list); list->count = 0; list->capacity = 0; } @@ -5562,6 +5563,7 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyInstance(VkInstance instance, const icd_terms = next_icd_term; } + ptr_instance->icd_terms = NULL; loader_delete_layer_list_and_properties(ptr_instance, &ptr_instance->instance_layer_list); loader_scanned_icd_clear(ptr_instance, &ptr_instance->icd_tramp_list); |