From 8f3f46c740b9218d3e35b56bd17e330c96fe0283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Thu, 3 Jun 2010 10:59:17 +0000 Subject: [PATCH] Forward port commit 1134074 CCBUG: 240464 svn path=/trunk/KDE/kdebase/workspace/; revision=1134076 --- useractions.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/useractions.cpp b/useractions.cpp index 5108485dbe..2a53e29f31 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -866,22 +866,28 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op ) break; case Options::MoveClientInGroupLeftOp: { - int c_id = c->clientGroup()->indexOfClient( c ); - int size = c->clientGroup()->clients().count(); - if( c_id > 0 ) - c->clientGroup()->setVisible( c_id - 1 ); - else - c->clientGroup()->setVisible( size - 1 ); + if( clientGroup() ) + { + int c_id = c->clientGroup()->indexOfClient( c ); + int size = c->clientGroup()->clients().count(); + if( c_id > 0 ) + c->clientGroup()->setVisible( c_id - 1 ); + else + c->clientGroup()->setVisible( size - 1 ); + } break; } case Options::MoveClientInGroupRightOp: { - int c_id = c->clientGroup()->indexOfClient( c ); - int size = c->clientGroup()->clients().count(); - if( c_id < size - 1 ) - c->clientGroup()->setVisible( c_id + 1 ); - else - c->clientGroup()->setVisible( 0 ); + if( clientGroup() ) + { + int c_id = c->clientGroup()->indexOfClient( c ); + int size = c->clientGroup()->clients().count(); + if( c_id < size - 1 ) + c->clientGroup()->setVisible( c_id + 1 ); + else + c->clientGroup()->setVisible( 0 ); + } break; } case Options::CloseClientGroupOp: