diff --git a/src/wmmgr.cc b/src/wmmgr.cc index 0ceb9159e..5476866fe 100644 --- a/src/wmmgr.cc +++ b/src/wmmgr.cc @@ -2159,7 +2159,7 @@ YFrameWindow *YWindowManager::getLastFocus(bool skipAllWorkspaces, int workspace for (; pass < 3; pass++) { YFrameIter w = focusedReverseIterator(); while (++w) { - if (!w->client()->adopted()) + if (!w->client() || !w->client()->adopted()) continue; if (w->isUnmapped() && (pass < 2 || !w->isRollup())) continue;