Guard against null Group in EffectWindow::group()

Closed windows don't belong to any group.

BUG: 476827
This commit is contained in:
Vlad Zahorodnii 2023-11-22 13:05:54 +02:00
parent 3875096d62
commit 1f32d01a49

View file

@ -213,10 +213,10 @@ void EffectWindow::addLayerRepaint(const QRect &r)
const EffectWindowGroup *EffectWindow::group() const
{
if (auto c = qobject_cast<X11Window *>(d->m_window)) {
return c->group()->effectGroup();
if (Group *group = d->m_window->group()) {
return group->effectGroup();
}
return nullptr; // TODO
return nullptr;
}
void EffectWindow::refWindow()