fix a littlebit that hack about setting editing mode in infopanel
authorIlkka Ollakka <ileoo@videolan.org>
Mon, 27 Aug 2007 18:44:46 +0000 (18:44 +0000)
committerIlkka Ollakka <ileoo@videolan.org>
Mon, 27 Aug 2007 18:44:46 +0000 (18:44 +0000)
modules/gui/qt4/dialogs/mediainfo.cpp

index 44dcb50..2f2abed 100644 (file)
@@ -142,7 +142,12 @@ void MediaInfoDialog::setInput( input_item_t *p_input )
      *
      * This really doesn't seem as clean solution as it could be
      */
-    in_edit = ( input_GetItem( MainInputManager::getInstance( p_intf )->getInput() ) != p_input );
+    input_thread_t *p_current =
+                     MainInputManager::getInstance( p_intf )->getInput();
+    if( !p_current || p_current->b_dead )
+        in_edit = true;
+    else
+        in_edit = ( input_GetItem( p_current ) != p_input );
     MP->setEdit( in_edit );
 }