From b0f72ed788cba568f678d0a1d5bcf4bdd12717d0 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 21 Feb 2022 13:27:06 +1100 Subject: [PATCH] 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: --- subprojects/gst-plugins-good/gst/rtp/gstrtpulpfecenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpulpfecenc.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpulpfecenc.c index 5928ba9..c95fe0d 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpulpfecenc.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpulpfecenc.c @@ -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); } -- 2.7.4