sctpassociation: don't join a NULL thread
authorMatthew Waters <matthew@centricular.com>
Mon, 10 Sep 2018 13:24:21 +0000 (23:24 +1000)
committerMatthew Waters <matthew@centricular.com>
Fri, 21 Sep 2018 09:36:52 +0000 (19:36 +1000)
Can occur if no connection is actually made and thus no connection
thread is created.

ext/sctp/sctpassociation.c

index b7c6864..23be55f 100644 (file)
@@ -216,7 +216,8 @@ gst_sctp_association_finalize (GObject * object)
   }
   G_UNLOCK (associations_lock);
 
-  g_thread_join (self->connection_thread);
+  if (self->connection_thread)
+    g_thread_join (self->connection_thread);
 
   G_OBJECT_CLASS (gst_sctp_association_parent_class)->finalize (object);
 }