It's possible that there is no active client. So check for it to crash less in alt+tab.

BUG: 210223

svn path=/trunk/KDE/kdebase/workspace/; revision=1034001
This commit is contained in:
Martin Gräßlin 2009-10-11 18:12:06 +00:00
parent 09364cdac0
commit fe3ff7b483

View file

@ -300,7 +300,8 @@ void TabBox::reset( bool partial_reset )
m_tabBox->createModel( partial_reset ); m_tabBox->createModel( partial_reset );
if( !partial_reset ) if( !partial_reset )
{ {
setCurrentClient( workspace()->activeClient() ); if( workspace()->activeClient() )
setCurrentClient( workspace()->activeClient() );
// it's possible that the active client is not part of the model // it's possible that the active client is not part of the model
// in that case the index is invalid // in that case the index is invalid
if( !m_index.isValid() ) if( !m_index.isValid() )