aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11_vulkan.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-06 17:14:52 -0400
committerDavid Robillard <d@drobilla.net>2021-05-06 17:14:52 -0400
commit089c119689ede4f4414e36da6e1aadd1c02b1eae (patch)
treeb25be113ecc87658cc12390cbf4f5aa75dc3fbd6 /src/x11_vulkan.c
parentaf3dea4bb671e97eeb5fd2208f691f5e746a3b69 (diff)
downloadpugl-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.c7
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;
}