diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 79240f7ac6..55ec053b5a 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -89,6 +89,12 @@ DesktopGridEffect::~DesktopGridEffect() foreach (ElectricBorder border, borderActivate) { effects->unreserveElectricBorder(border); } + QHash< DesktopButtonsView*, EffectWindow* >::iterator i = m_desktopButtonsViews.begin(); + while (i != m_desktopButtonsViews.end()) { + DesktopButtonsView *view = i.key(); + i = m_desktopButtonsViews.erase(i); + view->deleteLater(); + } } void DesktopGridEffect::reconfigure(ReconfigureFlags)