encodebin: guard against pathological NULL dereference

Coverity 1139798
This commit is contained in:
Vincent Penquerc'h 2014-04-10 13:26:42 +01:00
parent f588d14cdc
commit 1afa3040b8

View file

@ -1061,6 +1061,8 @@ _has_class (GstElement * element, const gchar * classname)
klass = GST_ELEMENT_GET_CLASS (element); klass = GST_ELEMENT_GET_CLASS (element);
value = gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS); value = gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS);
if (!value)
return FALSE;
return strstr (value, classname) != NULL; return strstr (value, classname) != NULL;
} }