Skip to content
Commit 2ff040a7 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

plugins/slidingpopups: Fix a crash on compositing restart

The sliding popups effect can be unloaded while there's still an active
animation for a closed window.

If that happens, the EffectsHandler::windowDeleted signal may be emitted
when the EffectWindowDeletedRef objects are destroyed. It happens after
the SlidingPopupsEffect destructor.

The sliding popups effect also has an EffectsHandler::windowDeleted
slot.

So, the problem is that m_animationsData gets destroyed first, then
m_animations is destroyed next. When m_animations is destroyed, the
deleted references will be released and EffectsHandler::windowDeleted
will be emitted. SlidingPopupsEffect::slotWindowDeleted will access
m_animationsData whose memory has been just released.

In order to prevent crashing, this change ensures that animations are
canceled while m_animationsData is still valid.
parent a3bc2aba
Pipeline #401340 passed with stage
in 8 minutes and 5 seconds
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