ulpfecenc: slightly safer dispose impl

Technically dispose can be called more than once (even if gstelement is
not actually set up to do that) so need to protect against that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>
This commit is contained in:
Matthew Waters 2022-02-21 13:27:06 +11:00 committed by GStreamer Marge Bot
parent 629b427a13
commit b0f72ed788

View file

@ -753,7 +753,9 @@ gst_rtp_ulpfec_enc_dispose (GObject * obj)
{
GstRtpUlpFecEnc *fec = GST_RTP_ULPFEC_ENC (obj);
g_hash_table_destroy (fec->ssrc_to_ctx);
if (fec->ssrc_to_ctx)
g_hash_table_destroy (fec->ssrc_to_ctx);
fec->ssrc_to_ctx = NULL;
G_OBJECT_CLASS (gst_rtp_ulpfec_enc_parent_class)->dispose (obj);
}