gst-inspect: don't use gst_structure_foreach() on NULL pointers

This commit is contained in:
Tim-Philipp Müller 2010-09-07 11:09:16 +01:00
parent 8a72f53312
commit 1b4504c50d

View file

@ -225,8 +225,10 @@ print_factory_details_info (GstElementFactory * factory)
n_print (" Rank:\t\t%s (%d)\n",
get_rank_name (s, GST_PLUGIN_FEATURE (factory)->rank),
GST_PLUGIN_FEATURE (factory)->rank);
gst_structure_foreach ((GstStructure *) factory->meta_data,
print_factory_details_meta_data, NULL);
if (factory->meta_data != NULL) {
gst_structure_foreach ((GstStructure *) factory->meta_data,
print_factory_details_meta_data, NULL);
}
n_print ("\n");
}