on xenial help sign in
Use deleteLater instead of a direct delete

We are seeing a crash in QQuickWindowPrivate::polishItems because LVWPH is deleting items to polish from it's updatePolish which means the set in QQuickWindowPrivate::polishItems may end up with some yet-to-process-but-now-deleted items. Switching to deleteLater fixes this Approved by: Michał Sawicz

commitc1f6f41fba89095a3e9aa7b557d802379a06bc18 authorAlbert Astals <albert.astals@canonical.com> dateFri 25 Jul 2014, 10:47 (12 years ago) parent3d1d3f062fd37c
1 file changed+1−1
plugins/Dash/listviewwithpageheader.cpp+1−1
plugins/Dash/listviewwithpageheader.cpp+1−1
@@ -656,7 +656,7 @@ void ListViewWithPageHeader::reallyReleaseItem(ListItem *listItem)
656656 if (flags & QQmlDelegateModel::Destroyed) {
657657 item->setParentItem(nullptr);
658658 }
659− delete listItem->sectionItem();
659+ listItem->sectionItem()->deleteLater();
660660 delete listItem;
661661}
662662