mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-10 13:51:20 +00:00
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.
This commit is contained in:
parent
16d48770d1
commit
c110b62cf8
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue