]> git.sesse.net Git - vlc/blobdiff - modules/video_output/msw/directx.c
misc/objects.c: Don't rely on vlc_object_destroy() to destroy objects, but expects...
[vlc] / modules / video_output / msw / directx.c
index e2232468f3707839c6ebff5eda6358a250ffd766..915af9f1e2ffc45ebc25ada2c9fc01def089ecdb 100644 (file)
@@ -281,7 +281,7 @@ static int OpenVideo( vlc_object_t *p_this )
                            E_(EventThread), 0, 1 ) )
     {
         msg_Err( p_vout, "cannot create Vout EventThread" );
-        vlc_object_destroy( p_vout->p_sys->p_event );
+        vlc_object_release( p_vout->p_sys->p_event );
         p_vout->p_sys->p_event = NULL;
         goto error;
     }
@@ -505,7 +505,7 @@ static void CloseVideo( vlc_object_t *p_this )
         }
 
         vlc_thread_join( p_vout->p_sys->p_event );
-        vlc_object_destroy( p_vout->p_sys->p_event );
+        vlc_object_release( p_vout->p_sys->p_event );
     }
 
     vlc_mutex_destroy( &p_vout->p_sys->lock );