camerabinpreview: fix potential crash on preview pipeline error

Post error message on actual element, not the allocated helper struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1474>
This commit is contained in:
Tim-Philipp Müller 2020-07-28 11:27:37 +01:00 committed by GStreamer Merge Bot
parent deefedd002
commit d4caa1b3ae

View file

@ -56,7 +56,7 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer user_data)
g_error_free (err);
/* TODO Not sure if we should post an Error or Warning here */
GST_ELEMENT_ERROR (data, CORE, FAILED,
GST_ELEMENT_ERROR (data->element, CORE, FAILED,
("fatal error in preview pipeline, disposing the pipeline"), (NULL));
/* Possible error situations: