Commit 67cd9d15 authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Gwenole Beauchesne

display: don't crash when config is empty.

Signed-off-by: default avatarGwenole Beauchesne <gwenole.beauchesne@intel.com>
parent 2da35201
......@@ -142,6 +142,9 @@ find_config(
GstVaapiConfig *config;
guint i;
if (!configs)
return FALSE;
for (i = 0; i < configs->len; i++) {
config = &g_array_index(configs, GstVaapiConfig, i);
if (config->profile == profile && config->entrypoint == entrypoint)
......@@ -158,6 +161,9 @@ get_profile_caps(GArray *configs)
GstCaps *out_caps, *caps;
guint i;
if (!configs)
return NULL;
out_caps = gst_caps_new_empty();
if (!out_caps)
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment