]> git.sesse.net Git - vlc/commitdiff
Fixed signal and input release order.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 27 Dec 2008 11:26:25 +0000 (12:26 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 5 Jan 2009 19:49:15 +0000 (20:49 +0100)
modules/gui/qt4/input_manager.cpp

index 28820747606789cb403c197d8b056269777c7249..7d3d53b843f38c32852480a69cdd9adf57590046 100644 (file)
@@ -776,9 +776,9 @@ MainInputManager::~MainInputManager()
 {
     if( p_input )
     {
+       emit inputChanged( NULL );
        var_DelCallback( p_input, "state", PLItemChanged, this );
        vlc_object_release( p_input );
-       emit inputChanged( NULL );
     }
 
     var_DelCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, this );
@@ -808,9 +808,9 @@ void MainInputManager::customEvent( QEvent *event )
         vlc_mutex_lock( &p_intf->change_lock );
         if( p_input && ( p_input->b_dead || !vlc_object_alive (p_input) ) )
         {
+            emit inputChanged( NULL );
             var_DelCallback( p_input, "state", PLItemChanged, this );
             vlc_object_release( p_input );
-            emit inputChanged( NULL );
             p_input = NULL;
             vlc_mutex_unlock( &p_intf->change_lock );
             return;