From a7a1a8aed4f42e5fc73ce18ba98c4ba520028160 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Thu, 19 May 2016 22:21:57 +0200 Subject: [PATCH] Destroy debug callback (Fixes #15) --- base/vulkandebug.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/base/vulkandebug.cpp b/base/vulkandebug.cpp index 25cb6d12..9f2fce94 100644 --- a/base/vulkandebug.cpp +++ b/base/vulkandebug.cpp @@ -76,7 +76,7 @@ namespace vkDebug instance, &dbgCreateInfo, nullptr, - &msgCallback); + (callBack != nullptr) ? &callBack : &msgCallback); assert(!err); } @@ -84,8 +84,7 @@ namespace vkDebug { if (msgCallback != VK_NULL_HANDLE) { - // Commented out as this crashes on some implementations for some reason (at least in VS2015) - // DestroyDebugReportCallback(instance, msgCallback, nullptr); + DestroyDebugReportCallback(instance, msgCallback, nullptr); } } } \ No newline at end of file