summaryrefslogtreecommitdiff
path: root/ext/vulkan
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-09-01 19:43:59 +1000
committerMatthew Waters <matthew@centricular.com>2016-09-08 16:14:31 +1000
commitc110b62cf82cc374cd5db82de734f2c47552e9e2 (patch)
tree36f37066064c65cb83b6d7897abf3899a068053d /ext/vulkan
parent16d48770d1e9904c5510184db4a440d3f998d468 (diff)
vkutils: set the last element of the layer array to NULL
g_strv* functions require this to not read off the end of the array.
Diffstat (limited to 'ext/vulkan')
-rw-r--r--ext/vulkan/vkutils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/vulkan/vkutils.c b/ext/vulkan/vkutils.c
index 4b547550a..1c25cb812 100644
--- a/ext/vulkan/vkutils.c
+++ b/ext/vulkan/vkutils.c
@@ -36,6 +36,7 @@ _check_for_all_layers (uint32_t check_count, const char **check_names,
if (check_count <= 0 || layer_count <= 0) {
GST_WARNING ("no layers requested or supported");
+ *supported_layers = NULL;
return FALSE;
}
@@ -55,6 +56,7 @@ _check_for_all_layers (uint32_t check_count, const char **check_names,
GST_WARNING ("Cannot find layer: %s", check_names[i]);
}
+ (*supported_layers)[k] = NULL;
*supported_layers_count = g_strv_length (*supported_layers);
return TRUE;