summaryrefslogtreecommitdiffstats
path: root/gst/librfb/gstrfbsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/librfb/gstrfbsrc.c')
-rw-r--r--gst/librfb/gstrfbsrc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/librfb/gstrfbsrc.c b/gst/librfb/gstrfbsrc.c
index 0df0555f..b218fceb 100644
--- a/gst/librfb/gstrfbsrc.c
+++ b/gst/librfb/gstrfbsrc.c
@@ -180,7 +180,11 @@ gst_rfb_src_dispose (GObject * object)
GstRfbSrc *src = GST_RFB_SRC (object);
g_free (src->host);
- rfb_decoder_free (src->decoder);
+ if (src->decoder) {
+ rfb_decoder_free (src->decoder);
+ g_free (src->decoder);
+ src->decoder = NULL;
+ }
G_OBJECT_CLASS (parent_class)->dispose (object);
}