diff options
author | David Robillard <d@drobilla.net> | 2021-05-06 17:14:52 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-06 17:14:52 -0400 |
commit | 089c119689ede4f4414e36da6e1aadd1c02b1eae (patch) | |
tree | b25be113ecc87658cc12390cbf4f5aa75dc3fbd6 /src/x11_vulkan.c | |
parent | af3dea4bb671e97eeb5fd2208f691f5e746a3b69 (diff) | |
download | pugl-089c119689ede4f4414e36da6e1aadd1c02b1eae.tar.gz pugl-089c119689ede4f4414e36da6e1aadd1c02b1eae.tar.bz2 pugl-089c119689ede4f4414e36da6e1aadd1c02b1eae.zip |
Add basic test for Vulkan support
Diffstat (limited to 'src/x11_vulkan.c')
-rw-r--r-- | src/x11_vulkan.c | 7 |
1 files changed, 2 insertions, 5 deletions
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; } |