From a29eb333d01d2da50a454e3f0788054fcf3e6102 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Wed, 7 Nov 2001 01:09:29 +0000 Subject: [PATCH] Don't crash when you happen to select a window with alt-tab that has just disappeared. (forward port) svn path=/trunk/kdebase/kwin/; revision=121076 --- tabbox.cpp | 2 ++ workspace.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/tabbox.cpp b/tabbox.cpp index 9ff6609dab..b4eeca865b 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -161,6 +161,8 @@ Client* TabBox::currentClient() { if ( mode() != WindowsMode ) return 0; + if (!workspace()->hasClient( client )) + return 0; return client; } diff --git a/workspace.cpp b/workspace.cpp index f108547638..b19a67186c 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -736,6 +736,7 @@ bool Workspace::destroyClient( Client* c) return FALSE; storeFakeSessionInfo( c ); + if (clients.contains(c)) removeClient(c); @@ -752,6 +753,10 @@ bool Workspace::destroyClient( Client* c) if ( c == last_active_client ) last_active_client = 0; delete c; + + if (tab_grab) + tab_box->repaint(); + updateClientArea(); return TRUE; }