[kwin] Fix crash in tear-down of EffectsHandlerImpl
Adding a simplified logic to unload all effects directly in the dtor. Looks like Qt didn't like our double traversal over the list any more and was causing double deletions.
This commit is contained in:
parent
6a1cadc0a7
commit
0ad6811684
1 changed files with 15 additions and 2 deletions
17
effects.cpp
17
effects.cpp
|
@ -261,8 +261,21 @@ EffectsHandlerImpl::~EffectsHandlerImpl()
|
|||
{
|
||||
if (keyboard_grab_effect != NULL)
|
||||
ungrabKeyboard();
|
||||
for (const EffectPair & ep : loaded_effects)
|
||||
unloadEffect(ep.first);
|
||||
setActiveFullScreenEffect(nullptr);
|
||||
for (auto it = loaded_effects.begin(); it != loaded_effects.end(); ++it) {
|
||||
const QString &name = (*it).first;
|
||||
Effect *effect = (*it).second;
|
||||
stopMouseInterception(effect);
|
||||
// remove support properties for the effect
|
||||
const QList<QByteArray> properties = m_propertiesForEffects.keys();
|
||||
for (const QByteArray &property : properties) {
|
||||
removeSupportProperty(property, effect);
|
||||
}
|
||||
delete effect;
|
||||
if (effect_libraries.contains(name)) {
|
||||
effect_libraries[ name ]->unload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::setupClientConnections(Client* c)
|
||||
|
|
Loading…
Reference in a new issue