diff --git a/shadow.cpp b/shadow.cpp --- a/shadow.cpp +++ b/shadow.cpp @@ -331,12 +331,12 @@ bool Shadow::updateShadow() { - auto clear = [this] { - if (m_topLevel && m_topLevel->shadow()) { - auto w = m_topLevel->effectWindow(); + auto clear = [topLevel = m_topLevel] { + if (topLevel && topLevel->shadow()) { + auto w = topLevel->effectWindow(); // this also deletes the shadow w->sceneWindow()->updateShadow(nullptr); - emit m_topLevel->shadowChanged(); + emit topLevel->shadowChanged(); } };