Fix regression in Workspace::activateNextClient

This fixes yet another regression from the transient refactoring.
The passed in client might be null, so we need a nullptr check. There
are several already in that code.

Was tricky given that I removed a cast there.
This commit is contained in:
Martin Gräßlin 2015-09-17 16:15:26 +02:00
parent 000954c508
commit 23f1b04a71

View file

@ -483,7 +483,7 @@ bool Workspace::activateNextClient(AbstractClient* c)
if (!get_focus) { // no suitable window under the mouse -> find sth. else
// first try to pass the focus to the (former) active clients leader
if (c->isTransient()) {
if (c && c->isTransient()) {
auto leaders = c->mainClients();
if (leaders.count() == 1 && FocusChain::self()->isUsableFocusCandidate(leaders.at(0), c)) {
get_focus = leaders.at(0);