Fix #1487
authorRafaël Carré <funman@videolan.org>
Mon, 17 Mar 2008 20:32:09 +0000 (21:32 +0100)
committerRafaël Carré <funman@videolan.org>
Mon, 17 Mar 2008 20:33:44 +0000 (21:33 +0100)
Don't use an object after releasing it

modules/gui/qt4/input_manager.cpp

index cee7193..4b81c07 100644 (file)
@@ -108,18 +108,17 @@ void InputManager::delInput()
     if( p_input )
     {
         delCallbacks();
     if( p_input )
     {
         delCallbacks();
-        vlc_object_release( p_input );
         i_old_playing_status = END_S;
         i_old_playing_status = END_S;
-
         i_input_id = 0;
         old_name   = "";
         artUrl     = "";
         i_input_id = 0;
         old_name   = "";
         artUrl     = "";
-        p_input    = NULL;
         emit positionUpdated( 0.0, 0 ,0 );
         emit statusChanged( END_S );
         emit nameChanged( "" );
         emit artChanged( "" );
         emit rateChanged( INPUT_RATE_DEFAULT );
         emit positionUpdated( 0.0, 0 ,0 );
         emit statusChanged( END_S );
         emit nameChanged( "" );
         emit artChanged( "" );
         emit rateChanged( INPUT_RATE_DEFAULT );
+        vlc_object_release( p_input );
+        p_input = NULL;
     }
 }
 
     }
 }