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;