Commit 9793a7c8 authored by Olivier Teulière's avatar Olivier Teulière

* modules/gui/wxwindows/fileinfo.cpp: do not use p_intf->p_sys->p_input to

   get the input thread, as this does not work when called through the dialogs
   provider. Use vlc_object_find() instead.
parent 7b8099d5
...@@ -232,17 +232,17 @@ DialogsProvider::~DialogsProvider() ...@@ -232,17 +232,17 @@ DialogsProvider::~DialogsProvider()
void DialogsProvider::OnIdle( wxIdleEvent& WXUNUSED(event) ) void DialogsProvider::OnIdle( wxIdleEvent& WXUNUSED(event) )
{ {
/* Update the log window */ /* Update the log window */
if( p_messages_dialog ) if( p_messages_dialog )
p_messages_dialog->UpdateLog(); p_messages_dialog->UpdateLog();
/* Update the playlist */ /* Update the playlist */
if( p_playlist_dialog ) if( p_playlist_dialog )
p_playlist_dialog->UpdatePlaylist(); p_playlist_dialog->UpdatePlaylist();
/* Update the fileinfo windows */ /* Update the fileinfo windows */
if( p_fileinfo_dialog ) if( p_fileinfo_dialog )
p_fileinfo_dialog->UpdateFileInfo(); p_fileinfo_dialog->UpdateFileInfo();
} }
void DialogsProvider::OnPlaylist( wxCommandEvent& WXUNUSED(event) ) void DialogsProvider::OnPlaylist( wxCommandEvent& WXUNUSED(event) )
......
...@@ -101,7 +101,9 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ): ...@@ -101,7 +101,9 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
void FileInfo::UpdateFileInfo() 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 ) if( !p_input || p_input->b_dead || !p_input->input.p_item->psz_name )
{ {
...@@ -110,6 +112,10 @@ void FileInfo::UpdateFileInfo() ...@@ -110,6 +112,10 @@ void FileInfo::UpdateFileInfo()
fileinfo_root_label = wxT(""); fileinfo_root_label = wxT("");
fileinfo_tree->DeleteChildren( fileinfo_root ); fileinfo_tree->DeleteChildren( fileinfo_root );
} }
if (p_input)
{
vlc_object_release(p_input);
}
return; return;
} }
...@@ -126,6 +132,7 @@ void FileInfo::UpdateFileInfo() ...@@ -126,6 +132,7 @@ void FileInfo::UpdateFileInfo()
else if( fileinfo_root_label == wxL2U(p_input->input.p_item->psz_name) && else if( fileinfo_root_label == wxL2U(p_input->input.p_item->psz_name) &&
b_need_update == VLC_FALSE ) b_need_update == VLC_FALSE )
{ {
vlc_object_release(p_input);
return; return;
} }
...@@ -153,6 +160,7 @@ void FileInfo::UpdateFileInfo() ...@@ -153,6 +160,7 @@ void FileInfo::UpdateFileInfo()
b_need_update = VLC_FALSE; b_need_update = VLC_FALSE;
vlc_object_release(p_input);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment