udpsrc: don't crash dereferencing NULL error when leaving multicast group on shutdown

Strangely enough, if we do pass an error variable to be filled, we
no longer get an error on leaving.
This commit is contained in:
Tim-Philipp Müller 2012-07-24 19:04:39 +01:00
parent 6cc2ad4744
commit d6f4f1e01f

View file

@ -954,7 +954,7 @@ gst_udpsrc_stop (GstBaseSrc * bsrc)
if (!g_socket_leave_multicast_group (src->used_socket,
g_inet_socket_address_get_address (src->addr), FALSE,
src->multi_iface, NULL)) {
src->multi_iface, &err)) {
GST_ERROR_OBJECT (src, "Failed to leave multicast group: %s",
err->message);
g_clear_error (&err);