From 8dc537ff0ae6489317f36b15dfe0601e4a1594ea Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 15 Nov 2018 10:19:25 +0000 Subject: [PATCH] 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 --- src/wayland/plasmavirtualdesktop_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/plasmavirtualdesktop_interface.cpp b/src/wayland/plasmavirtualdesktop_interface.cpp index 9aa8cf7227..540efd430b 100644 --- a/src/wayland/plasmavirtualdesktop_interface.cpp +++ b/src/wayland/plasmavirtualdesktop_interface.cpp @@ -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 PlasmaVirtualDesktopManagementInterface::desktops() const