Merge pull request #3839 from orestisfl/remanage_window-crash

remanage_window: avoid crash when nc->window == NULL
This commit is contained in:
Orestis 2019-10-18 16:51:42 +03:00 committed by GitHub
commit 428cb94e29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -698,7 +698,7 @@ out:
Con *remanage_window(Con *con) { Con *remanage_window(Con *con) {
Match *match; Match *match;
Con *nc = con_for_window(croot, con->window, &match); Con *nc = con_for_window(croot, con->window, &match);
if (nc == NULL || nc->window == con->window) { if (nc == NULL || nc->window == NULL || nc->window == con->window) {
run_assignments(con->window); run_assignments(con->window);
return con; return con;
} }