From bcb3ad4ada6f1402e73b793c0eeddf123da57530 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 31 Mar 2006 10:43:57 +0000 Subject: [PATCH] kwin: stop crashing svn path=/trunk/KDE/kdebase/workspace/; revision=524824 --- tabbox.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tabbox.cpp b/tabbox.cpp index 828fc85616..19cd92c525 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -1149,6 +1149,8 @@ int Workspace::previousDesktopFocusChain( int iDesktop ) const */ Client* Workspace::nextFocusChainClient( Client* c ) const { + if ( !c ) + return 0; int desktop = c->isOnAllDesktops() ? currentDesktop() : c->desktop(); if ( focus_chain[desktop].isEmpty() ) return 0; @@ -1167,6 +1169,8 @@ Client* Workspace::nextFocusChainClient( Client* c ) const */ Client* Workspace::previousFocusChainClient( Client* c ) const { + if ( !c ) + return 0; int desktop = c->isOnAllDesktops() ? currentDesktop() : c->desktop(); if ( focus_chain[desktop].isEmpty() ) return 0;