effects/slidingpopups: Prevent potential use-after-free
This commit is contained in:
parent
58ac7888e9
commit
cdd18cd393
1 changed files with 1 additions and 1 deletions
|
@ -186,6 +186,7 @@ void SlidingPopupsEffect::postPaintWindow(EffectWindow *w)
|
|||
{
|
||||
auto animationIt = m_animations.find(w);
|
||||
if (animationIt != m_animations.end()) {
|
||||
effects->addRepaint(w->expandedGeometry());
|
||||
if ((*animationIt).timeLine.done()) {
|
||||
if (!w->isDeleted()) {
|
||||
w->setData(WindowForceBackgroundContrastRole, QVariant());
|
||||
|
@ -193,7 +194,6 @@ void SlidingPopupsEffect::postPaintWindow(EffectWindow *w)
|
|||
}
|
||||
m_animations.erase(animationIt);
|
||||
}
|
||||
effects->addRepaint(w->expandedGeometry());
|
||||
}
|
||||
|
||||
effects->postPaintWindow(w);
|
||||
|
|
Loading…
Reference in a new issue