Commit 455ed9bc authored by Thomas Guillem's avatar Thomas Guillem
Browse files

qt: fix lock-order-inversion on open

parent d6a733b9
...@@ -435,6 +435,9 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) ...@@ -435,6 +435,9 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
} }
#endif #endif
/* Get the playlist before the lock to avoid a lock-order-inversion */
vlc_playlist_t *playlist = vlc_intf_GetMainPlaylist(p_intf);
vlc_mutex_locker locker (&lock); vlc_mutex_locker locker (&lock);
if (busy || open_state == OPEN_STATE_ERROR) if (busy || open_state == OPEN_STATE_ERROR)
{ {
...@@ -449,7 +452,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) ...@@ -449,7 +452,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
p_sys->p_mi = NULL; p_sys->p_mi = NULL;
/* set up the playlist to work on */ /* set up the playlist to work on */
p_sys->p_playlist = vlc_intf_GetMainPlaylist(p_intf); p_sys->p_playlist = playlist;
p_sys->p_player = vlc_playlist_GetPlayer( p_sys->p_playlist ); p_sys->p_player = vlc_playlist_GetPlayer( p_sys->p_playlist );
/* */ /* */
......
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