From c72b742f4df223aa59d11a0ac9ebe663ee321011 Mon Sep 17 00:00:00 2001 From: Mark Young Date: Wed, 4 May 2016 16:44:10 -0600 Subject: loader: Fix issue when ICD DestroyDebugReportCallbackEXT not found. Change-Id: Ic1d0f67ec2f8ca438c4bd546e6beb4d565daf89a --- loader/debug_report.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'loader/debug_report.c') diff --git a/loader/debug_report.c b/loader/debug_report.c index ae9b3ddf..c339c701 100644 --- a/loader/debug_report.c +++ b/loader/debug_report.c @@ -305,6 +305,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugReportCallback( if (icd) { storage_idx = 0; for (icd = inst->icds; icd; icd = icd->next) { + if (NULL == icd->DestroyDebugReportCallbackEXT) { + continue; + } + if (icd_info[storage_idx]) { icd->DestroyDebugReportCallbackEXT( icd->instance, icd_info[storage_idx], pAllocator); @@ -336,6 +340,10 @@ terminator_DestroyDebugReportCallback(VkInstance instance, icd_info = *(VkDebugReportCallbackEXT **)&callback; storage_idx = 0; for (icd = inst->icds; icd; icd = icd->next) { + if (NULL == icd->DestroyDebugReportCallbackEXT) { + continue; + } + if (icd_info[storage_idx]) { icd->DestroyDebugReportCallbackEXT( icd->instance, icd_info[storage_idx], pAllocator); -- cgit v1.2.3