From 73a3e3ca2d31eadfc830db30046dfe2262260afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 20 Jun 2010 12:21:44 +0000 Subject: [PATCH] When restarting kwin and there is a shaded group, set shade is called before a decoration is created. Catch this case, so that kwin doesn't crash. This fix is related to rev 1140342. CCBUG: 242206 svn path=/trunk/KDE/kdebase/workspace/; revision=1140343 --- client.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index 61656c2116..515724513b 100644 --- a/client.cpp +++ b/client.cpp @@ -981,7 +981,8 @@ void Client::setShade( ShadeMode mode ) assert( decoration != NULL ); // noborder windows can't be shaded GeometryUpdatesBlocker blocker( this ); // Decorations may turn off some borders when shaded - decoration->borders( border_left, border_right, border_top, border_bottom ); + if( decoration ) + decoration->borders( border_left, border_right, border_top, border_bottom ); // TODO: All this unmapping, resizing etc. feels too much duplicated from elsewhere if ( isShade()) @@ -1025,7 +1026,8 @@ void Client::setShade( ShadeMode mode ) updateVisibility(); updateAllowedActions(); workspace()->updateMinimizedOfTransients( this ); - decoration->shadeChange(); + if( decoration ) + decoration->shadeChange(); updateWindowRules(); // Update states of all other windows in this group