randr.c: Fix regression with focusing NULL container

This was introduced in db3b9e4187 which
removed the NULL check for next.

Fixes #3523.
next
Orestis Floros 2018-11-15 13:48:14 +02:00
parent 299e9b9fdd
commit a84b30f8a9
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 6 additions and 4 deletions

View File

@ -974,10 +974,12 @@ void randr_disable_output(Output *output) {
}
}
/* Restore focus after con_detach / con_attach */
DLOG("now focusing next = %p\n", next);
con_focus(next);
workspace_show(con_get_workspace(next));
/* Restore focus after con_detach / con_attach. next can be NULL, see #3523. */
if (next) {
DLOG("now focusing next = %p\n", next);
con_focus(next);
workspace_show(con_get_workspace(next));
}
/* 3: move the dock clients to the first output */
Con *child;