]> git.sesse.net Git - vlc/commit
skins2: fix skins crashing when playlist is flat
authorErwan Tulou <erwan10@videolan.org>
Thu, 6 May 2010 18:09:25 +0000 (20:09 +0200)
committerErwan Tulou <erwan10@videolan.org>
Thu, 6 May 2010 19:07:04 +0000 (21:07 +0200)
commit1ef175cb28927f1ad01acabaf6e09936c451dc60
tree094f6a4721ea1fd7091cf25caeae45e0d8346a45
parent86ca1b563da49e869e7ef3c62dab2a3c1c58916b
skins2: fix skins crashing when playlist is flat

m_firstPos (iterator associated to a stl list container) is not guaranteed to be valid (the associated item may have been deleted). Up to vlc1.0, this was no problem, because deleting an item was also buggy (a no-op). From vlc1.1 on, m_firstPos must now be recomputed to ensure it keeps on pointing to a valid item in all cases.

start for instance a playlist with the 'Dragon' skin as a test case.
This was pointed out by colt45 (from the forum)
modules/gui/skins2/controls/ctrl_tree.cpp