diff options
Diffstat (limited to 'src')
-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; } |