Fix crash on client termination

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
This commit is contained in:
Gregor Best 2014-01-21 19:18:00 +01:00 committed by Christoph Lohmann
parent e68297ed05
commit 0214014fbe

View file

@ -1094,6 +1094,7 @@ unmanage(int c) {
} else if(lastsel > c) {
lastsel--;
}
lastsel = MIN(lastsel, nclients - 1);
if(c == sel) {
/* Note that focus() will never set lastsel == sel,