]> git.sesse.net Git - vlc/blobdiff - src/interface/interaction.c
interaction: safely join the thread
[vlc] / src / interface / interaction.c
index 59a4f0f5eb600107ec27d1491df2f0e8d7c38712..6eab001827b4cff34d3edcbedf960dc8527f7f5c 100644 (file)
@@ -388,6 +388,16 @@ interaction_t * interaction_Init( libvlc_int_t *p_libvlc )
     return p_interaction;
 }
 
+void interaction_Destroy( interaction_t *p_interaction )
+{
+    if( !p_interaction )
+        return;
+
+    vlc_object_kill( p_interaction );
+    vlc_thread_join( p_interaction );
+    vlc_object_release( p_interaction );
+}
+
 /**********************************************************************
  * The following functions are local
  **********************************************************************/