Commit 8dc537ff authored by David Edmundson's avatar David Edmundson
Browse files

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
parent 1414e2ab
......@@ -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
......
Supports Markdown
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