mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
validate: Do not g_strrstr with a NULL pointer as needle
This commit is contained in:
parent
3402d5556a
commit
3a1db22188
1 changed files with 3 additions and 0 deletions
|
@ -475,6 +475,9 @@ gst_validate_utils_flags_from_str (GType type, const gchar * str_flags)
|
|||
GFlagsClass *class = g_type_class_ref (type);
|
||||
|
||||
for (i = 0; i < class->n_values; i++) {
|
||||
if (class->values[i].value_nick == NULL)
|
||||
continue;
|
||||
|
||||
if (g_strrstr (str_flags, class->values[i].value_nick)) {
|
||||
flags |= class->values[i].value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue