From: Pierre d'Herbemont Date: Wed, 16 Jul 2008 21:46:30 +0000 (+0200) Subject: qt4: Forgotten lock. Reported by ahoka. X-Git-Tag: 0.9.0-test3~412 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=db3f5756103f3103b28ca0554c59461602a75ccf;p=vlc qt4: Forgotten lock. Reported by ahoka. Anyway this is broken, qt4 shouldn't assume that the playlist_item_t can't be deleted. We need to implement refcounting here, or a sound garbage collection. Refcounting would be safer. --- diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp index fcc6d2df72..1403fc0ab7 100644 --- a/modules/gui/qt4/components/playlist/playlist.cpp +++ b/modules/gui/qt4/components/playlist/playlist.cpp @@ -79,8 +79,10 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, leftW->addWidget( artContainer ); /* Initialisation of the playlist */ + PL_LOCK; playlist_item_t *p_root = playlist_GetPreferredNode( THEPL, THEPL->p_local_category ); + PL_UNLOCK; rightPanel = new StandardPLPanel( this, p_intf, THEPL, p_root );