gst_element_factory_get_metadata: protect from null factory

This commit is contained in:
Stephane Cerveau 2019-03-13 18:46:14 +01:00
parent 919a530334
commit b5af526c9c

View file

@ -509,6 +509,8 @@ const gchar *
gst_element_factory_get_metadata (GstElementFactory * factory,
const gchar * key)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), NULL);
return gst_structure_get_string ((GstStructure *) factory->metadata, key);
}