elementfactory: don't crash if no element klass has been set

https://bugzilla.gnome.org/show_bug.cgi?id=683865
This commit is contained in:
Andreas Frisch 2012-09-12 14:14:31 +02:00 committed by Tim-Philipp Müller
parent 57b24d9c57
commit 0bc87ee5d9

View file

@ -686,6 +686,11 @@ gst_element_factory_list_is_type (GstElementFactory * factory,
klass =
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_KLASS);
if (klass == NULL) {
GST_ERROR_OBJECT (factory, "element factory is missing klass identifiers");
return res;
}
/* Filter by element type first, as soon as it matches
* one type, we skip all other tests */
if (!res && (type & GST_ELEMENT_FACTORY_TYPE_SINK))