Argh ! Check return values of functions like QWidget::layout() !

Took me ages to figure out why riscosstyle crashed :(

svn path=/trunk/kdebase/kwin/; revision=49137
This commit is contained in:
Rik Hemsley 2000-05-10 23:44:29 +00:00
parent 69c7133c9d
commit 1f13ef7c35

View file

@ -383,7 +383,8 @@ Client::~Client()
void Client::manage( bool isMapped )
{
layout()->setResizeMode( QLayout::Minimum );
if (layout())
layout()->setResizeMode( QLayout::Minimum );
QRect geom( original_geometry );
bool placementDone = FALSE;
@ -414,9 +415,11 @@ void Client::manage( bool isMapped )
windowWrapper()->resize( geom.size() );
// the clever activate() trick is necessary
layout()->activate();
if (layout())
layout()->activate();
resize ( sizeForWindowSize( geom.size() ) );
layout()->activate();
if (layout())
layout()->activate();
move( geom.x(), geom.y() );
gravitate( FALSE );
@ -1500,7 +1503,8 @@ void Client::setShade( bool s )
clearWFlags( WNorthWestGravity );
resize ( s );
windowWrapper()->show();
layout()->activate();
if (layout())
layout()->activate();
repaint();
if ( isActive() )
workspace()->requestFocus( this );