Original commit message from CVS:
Allow NULL to be a valid value for factory->extensions.
*
* Gets the extensions associated with a typefind factory. The returned
* array should not be changed. If you need to change stuff in it, you should
- * copy it using g_stdupv().
+ * copy it using g_stdupv(). This function may return NULL to indicate
+ * a 0-length list.
*
* Returns: a NULL-terminated array of extensions associated with this factory
*/
gst_xml_registry_save_caps (xmlregistry, factory->caps);
CLASS (xmlregistry)->save_func (xmlregistry, "</caps>\n");
} */
- while (factory->extensions[i]) {
- PUT_ESCAPED ("extension", factory->extensions[i]);
- i++;
+ if (factory->extensions) {
+ while (factory->extensions[i]) {
+ PUT_ESCAPED ("extension", factory->extensions[i]);
+ i++;
+ }
}
}
else if (GST_IS_SCHEDULER_FACTORY (feature)) {