The monitor sets the object->element object as a GstObject. This
works for debug traces, but will assert for ELEMENT_ERROR. This
was the only case where that could happen. Add a check for that.
+ g_free (format);
+
+ if (!GST_IS_ELEMENT (v4l2object->element))
+ return FALSE;
+
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,
(_("Failed to enumerate possible video formats device '%s' can work "
"with"), v4l2object->videodev),
("Failed to get number %d in pixelformat enumeration for %s. (%d - %s)",
n, v4l2object->videodev, errno, g_strerror (errno)));
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,
(_("Failed to enumerate possible video formats device '%s' can work "
"with"), v4l2object->videodev),
("Failed to get number %d in pixelformat enumeration for %s. (%d - %s)",
n, v4l2object->videodev, errno, g_strerror (errno)));