validate: Do not g_strrstr with a NULL pointer as needle

This commit is contained in:
Thibault Saunier 2014-05-01 18:17:44 +02:00
parent 3402d5556a
commit 3a1db22188

View file

@ -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;
}