[vlc-devel] [PATCH 1/2] qt: fix crash after recent playlist changes
Rémi Denis-Courmont
remi at remlab.net
Mon May 15 12:14:17 CEST 2017
On May 15, 2017 11:24:26 AM GMT+03:00, Steve Lhomme <robux4 at gmail.com> wrote:
>On Mon, May 15, 2017 at 10:21 AM, Rémi Denis-Courmont <remi at remlab.net>
>wrote:
>> On May 15, 2017 9:45:29 AM GMT+03:00, Steve Lhomme
><robux4 at videolabs.io> wrote:
>>>---
>>> modules/gui/qt/components/playlist/playlist_model.cpp | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>>diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp
>>>b/modules/gui/qt/components/playlist/playlist_model.cpp
>>>index 94ee4f2f39..fc14a7d2bd 100644
>>>--- a/modules/gui/qt/components/playlist/playlist_model.cpp
>>>+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
>>>@@ -721,7 +721,8 @@ void PLModel::removeItem( PLItem *item )
>>> void PLModel::updateChildren( PLItem *root )
>>> {
>>>playlist_item_t *p_node = playlist_ItemGetById( p_playlist,
>root->id()
>>>);
>>>- updateChildren( p_node, root );
>>>+ if (p_node)
>>>+ updateChildren( p_node, root );
>>> }
>>>
>>> /* This function must be entered WITH the playlist lock */
>>>--
>>>2.12.1
>>>
>>>_______________________________________________
>>>vlc-devel mailing list
>>>To unsubscribe or modify your subscription options:
>>>https://mailman.videolan.org/listinfo/vlc-devel
>>
>> Hello,
>>
>> For lack of rationale, this looks like a kludge rather than a fix for
>the real problem.
>
>It stopped crashing after a make clean. I suppose the logic means that
>the root item is always found in the playlist.
>
>>
>> --
>> Rémi Denis-Courmont
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
The actual root item can of course never go away. But it makes no sense to refer it by ID, since i is exposed directly in playlist_t.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list