From 089c119689ede4f4414e36da6e1aadd1c02b1eae Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 6 May 2021 17:14:52 -0400 Subject: Add basic test for Vulkan support --- src/x11_vulkan.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/x11_vulkan.c b/src/x11_vulkan.c index 1ff5759..f0334ce 100644 --- a/src/x11_vulkan.c +++ b/src/x11_vulkan.c @@ -40,13 +40,10 @@ struct PuglVulkanLoaderImpl { PuglVulkanLoader* puglNewVulkanLoader(PuglWorld* PUGL_UNUSED(world)) { - PuglVulkanLoader* loader = + PuglVulkanLoader* const loader = (PuglVulkanLoader*)calloc(1, sizeof(PuglVulkanLoader)); - if (!loader) { - return NULL; - } - if (!(loader->libvulkan = dlopen("libvulkan.so", RTLD_LAZY))) { + if (!loader || !(loader->libvulkan = dlopen("libvulkan.so", RTLD_LAZY))) { free(loader); return NULL; } -- cgit v1.2.1