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
This commit is contained in:
Martin Gräßlin 2010-06-20 12:21:44 +00:00
parent c9658fa34a
commit 73a3e3ca2d

View file

@ -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