kwin: Fix crash for Toplevel windows with zero EffectWindow

While closing a window it might happen that we emit the windowOpacityChanged
signal although we dont have an EffectWindow.
Related to commit 1ce3f9fc53aa93a7536d43d0c936266f0ae21b65
This commit is contained in:
Philipp Knechtges 2011-06-15 19:34:12 +02:00
parent 5194705e30
commit 89ec0b63aa

View file

@ -351,7 +351,7 @@ void EffectsHandlerImpl::slotClientStepUserMovedResized(Client* c, const QRect&
void EffectsHandlerImpl::slotOpacityChanged(Toplevel *t, qreal oldOpacity)
{
if (t->opacity() == oldOpacity) {
if (t->opacity() == oldOpacity || !t->effectWindow()) {
return;
}
emit windowOpacityChanged(t->effectWindow(), oldOpacity, (qreal)t->opacity());