kill the handle when the applet is destroyed, so don't crash when locking

desktop

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=845313
This commit is contained in:
Marco Martin 2008-08-11 13:16:46 +00:00
parent fa6480a137
commit 5f27b7bb30

View File

@ -1391,6 +1391,14 @@ void ContainmentPrivate::appletDestroyed(QObject* object)
if (focusedApplet == applet) {
focusedApplet = 0;
}
foreach (AppletHandle* handle, handles) {
if (handles.contains(applet)) {
handles.remove(handle->applet());
handle->deleteLater();
}
}
emit q->appletRemoved(applet);
emit q->configNeedsSaving();
}