Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e8c2dbbf authored by Michael Pyne's avatar Michael Pyne

Immediately update dynamic/search playlist items upon a change.

This is as opposed to recording the new list of PlaylistItems and then
effecting the change after draining the event loop (an attempt at
keeping GUI responsive if many updates are happening).

Otherwise it is possible to
- Generate a list of PlaylistItems to read from (when updating the
playlist) and push to end of event loop
- Delete some of those PlaylistItems due to already-queued events to
delete playlist items
- Finally try to use the list of PlaylistItems and run into a segfault
from trying to access a deleted PlaylistItem.

I think this should fix a crash when you delete multiple playlists.

BUG:389176
FIXED-IN:17.12.2
parent ea1da148
......@@ -149,11 +149,9 @@ void DynamicPlaylist::updateItems()
for(PlaylistList::ConstIterator it = m_playlists.constBegin(); it != m_playlists.constEnd(); ++it)
siblings += (*it)->items();
PlaylistItemList newSiblings = siblings;
if(m_siblings != newSiblings) {
m_siblings = newSiblings;
QTimer::singleShot(0, this, SLOT(slotUpdateItems()));
if(m_siblings != siblings) {
m_siblings = siblings;
slotUpdateItems();
}
}
......
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