]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/fileinfo.cpp
* modules/gui/wxwindows/fileinfo.cpp: do not use p_intf->p_sys->p_input to
[vlc] / modules / gui / wxwindows / fileinfo.cpp
index b229d9a2d74127522e2c68a74ff2e953fdeda966..43ec5a29234d582534a11aea2f655ee6aaea1854 100644 (file)
@@ -101,7 +101,9 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
 
 void FileInfo::UpdateFileInfo()
 {
-    input_thread_t *p_input = p_intf->p_sys->p_input;
+    input_thread_t *p_input =
+        (input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+                                           FIND_ANYWHERE );
 
     if( !p_input || p_input->b_dead || !p_input->input.p_item->psz_name )
     {
@@ -110,6 +112,10 @@ void FileInfo::UpdateFileInfo()
             fileinfo_root_label = wxT("");
             fileinfo_tree->DeleteChildren( fileinfo_root );
         }
+        if (p_input)
+        {
+            vlc_object_release(p_input);
+        }
         return;
     }
 
@@ -126,6 +132,7 @@ void FileInfo::UpdateFileInfo()
     else if( fileinfo_root_label == wxL2U(p_input->input.p_item->psz_name) &&
              b_need_update == VLC_FALSE )
     {
+        vlc_object_release(p_input);
         return;
     }
 
@@ -153,6 +160,7 @@ void FileInfo::UpdateFileInfo()
 
     b_need_update = VLC_FALSE;
 
+    vlc_object_release(p_input);
     return;
 }