Delete the correct item in removeDesktop
Summary: QList::erase will move the data underneath where the iterator is pointing, we want to delete the entry we're about to remove from the list. Test Plan: Relevant tests now behave better Reviewers: #kwin, broulik Reviewed By: broulik Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D16885
This commit is contained in:
parent
1414e2abcc
commit
8dc537ff0a
1 changed files with 1 additions and 1 deletions
|
@ -246,8 +246,8 @@ void PlasmaVirtualDesktopManagementInterface::removeDesktop(const QString &id)
|
|||
org_kde_plasma_virtual_desktop_management_send_desktop_removed(*it, id.toUtf8().constData());
|
||||
}
|
||||
|
||||
d->desktops.erase(deskIt);
|
||||
(*deskIt)->deleteLater();
|
||||
d->desktops.erase(deskIt);
|
||||
}
|
||||
|
||||
QList <PlasmaVirtualDesktopInterface *> PlasmaVirtualDesktopManagementInterface::desktops() const
|
||||
|
|
Loading…
Reference in a new issue