mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
tools/gst-inspect: Check we're not handling NULL pointers.
This commit is contained in:
parent
b11d72adb4
commit
adfb63837c
1 changed files with 4 additions and 1 deletions
|
@ -992,6 +992,8 @@ print_element_list (gboolean print_all)
|
||||||
while (features) {
|
while (features) {
|
||||||
GstPluginFeature *feature;
|
GstPluginFeature *feature;
|
||||||
|
|
||||||
|
if (G_UNLIKELY (features->data == NULL))
|
||||||
|
goto next;
|
||||||
feature = GST_PLUGIN_FEATURE (features->data);
|
feature = GST_PLUGIN_FEATURE (features->data);
|
||||||
featurecount++;
|
featurecount++;
|
||||||
|
|
||||||
|
@ -1040,6 +1042,7 @@ print_element_list (gboolean print_all)
|
||||||
g_type_name (G_OBJECT_TYPE (feature)));
|
g_type_name (G_OBJECT_TYPE (feature)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
next:
|
||||||
features = g_list_next (features);
|
features = g_list_next (features);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1203,7 +1206,7 @@ print_plugin_features (GstPlugin * plugin)
|
||||||
gst_plugin_feature_get_name (feature));
|
gst_plugin_feature_get_name (feature));
|
||||||
|
|
||||||
num_typefinders++;
|
num_typefinders++;
|
||||||
} else {
|
} else if (feature) {
|
||||||
n_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
n_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
||||||
g_type_name (G_OBJECT_TYPE (feature)));
|
g_type_name (G_OBJECT_TYPE (feature)));
|
||||||
num_other++;
|
num_other++;
|
||||||
|
|
Loading…
Reference in a new issue