check whether SessionInfo::tabGroupClient is (still) in workspace before using it

BUG: 301456
FIXED-IN: 4.9
REVIEW: 105186
This commit is contained in:
Thomas Lübking 2012-06-08 20:39:27 +02:00
parent 3f30a7d6fb
commit 0bf8e0cc80

View file

@ -312,6 +312,8 @@ bool Client::manage(Window w, bool isMapped)
const bool autogrouping = rules()->checkAutogrouping(options->isAutogroupSimilarWindows()); const bool autogrouping = rules()->checkAutogrouping(options->isAutogroupSimilarWindows());
const bool autogroupInFg = rules()->checkAutogroupInForeground(options->isAutogroupInForeground()); const bool autogroupInFg = rules()->checkAutogroupInForeground(options->isAutogroupInForeground());
// Automatically add to previous groups on session restore // Automatically add to previous groups on session restore
if (session && session->tabGroupClient && !workspace()->hasClient(session->tabGroupClient))
session->tabGroupClient = NULL;
if (session && session->tabGroupClient && session->tabGroupClient != this) { if (session && session->tabGroupClient && session->tabGroupClient != this) {
tabBehind(session->tabGroupClient, autogroupInFg); tabBehind(session->tabGroupClient, autogroupInFg);
} else if (isMapped && autogrouping) { } else if (isMapped && autogrouping) {