Reset most_recently_raised when removing ShellClient

Summary:
This time without a test case that could trigger a crash as the only
reading usage of the variable could luckily not crash.

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6853
This commit is contained in:
Martin Gräßlin 2017-07-23 17:23:18 +02:00
parent bd158a6321
commit 7eb05552ca

View file

@ -425,6 +425,9 @@ void Workspace::init()
connect(w, &WaylandServer::shellClientRemoved, this,
[this] (ShellClient *c) {
m_allClients.removeAll(c);
if (c == most_recently_raised) {
most_recently_raised = nullptr;
}
if (c == delayfocus_client) {
cancelDelayFocus();
}