From 3bbc9d950dff9879eea04a28757b93df6832e831 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Mon, 21 Sep 2015 09:36:47 -0600 Subject: [PATCH] layers: Fix bug where logging_callback was not being correctly cleaned up --- layers/vk_layer_logging.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index f65f4887..bef168cc 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -157,6 +157,9 @@ static inline VkResult layer_create_msg_callback( if (!pNewDbgFuncNode) return VK_ERROR_OUT_OF_HOST_MEMORY; + // Handle of 0 is logging_callback so use allocated Node address as unique handle + if (!(*pMsgCallback)) + *pMsgCallback = (uint64_t) pNewDbgFuncNode; pNewDbgFuncNode->msgCallback = *pMsgCallback; pNewDbgFuncNode->pfnMsgCallback = pfnMsgCallback; pNewDbgFuncNode->msgFlags = msgFlags; -- 2.34.1