Don't emit windowDamaged on window deconstruction

The signal passed a null EffectWindow to all connected effects
which could cause a crash.
BUG: 273576
FIXED-IN: 4.7.0
This commit is contained in:
Martin Gräßlin 2011-05-19 17:28:15 +02:00
parent 2c0b0e9f18
commit 9ba2a8f5d7

View file

@ -431,6 +431,10 @@ void EffectsHandlerImpl::slotDesktopChanged(int old)
void EffectsHandlerImpl::slotWindowDamaged(Toplevel* t, const QRect& r)
{
if (!t->effectWindow()) {
// can happen during tear down of window
return;
}
emit windowDamaged(t->effectWindow(), r);
}