]> git.sesse.net Git - vlc/commitdiff
macosx: remove callback in VLCVoutView correctly. Fixes #5428
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 15 Oct 2011 14:56:25 +0000 (16:56 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 15 Oct 2011 14:56:25 +0000 (16:56 +0200)
modules/gui/macosx/VideoView.m

index ea702a26fa414c07ded0520cc4c3804cfdd125a0..86e9b05433f83fbdb056416d2bdf562f4c0069e7 100644 (file)
@@ -153,6 +153,13 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
 
 - (void)closeVout
 {
+    vout_thread_t * p_vout = getVout();
+    if( !p_vout )
+    {
+        var_DelCallback( p_vout, "video-device", DeviceCallback, NULL );
+        vlc_object_release( p_vout );
+    }
+
     /* Make sure we don't see a white flash */
     [o_view removeFromSuperview];
     [o_view release];