summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-03-01 13:42:28 +0000
committerTomasz Kramkowski <tk@the-tk.com>2018-03-01 14:43:22 +0000
commit5d05f6b155eba68f6de9b0d32a6914449e45a385 (patch)
treede01dd27c5630336934ce258b8cd2faba2e3940d
parent31497799058ddd776c1d448ea8931f598e86ae79 (diff)
downloadvulkan-5d05f6b155eba68f6de9b0d32a6914449e45a385.tar.gz
vulkan-5d05f6b155eba68f6de9b0d32a6914449e45a385.tar.xz
vulkan-5d05f6b155eba68f6de9b0d32a6914449e45a385.zip
validation: segfault: callback destructor was getting incorrect handle
vkDestroyDebugReportCallbackEXT now gets passed the handle not a pointer to it
-rw-r--r--validation.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/validation.c b/validation.c
index 6f24177..c9d2f9f 100644
--- a/validation.c
+++ b/validation.c
@@ -90,14 +90,15 @@ void *validation_createcb(VkInstance inst)
}
// validation_destroycb: Destroy the validation callback
-void validation_destroycb(VkInstance inst, void *cb)
+void validation_destroycb(VkInstance inst, void *_cb)
{
PFN_vkDestroyDebugReportCallbackEXT func;
+ VkDebugReportCallbackEXT *cb = _cb;
func = (PFN_vkDestroyDebugReportCallbackEXT)
vkGetInstanceProcAddr(inst, "vkDestroyDebugReportCallbackEXT");
if (func == NULL)
eprintf("Validation: Could not destroy callback: Failed to get destructor");
- func(inst, cb, NULL);
+ func(inst, *cb, NULL);
free(cb);
}