fix segfault if parent->mon is unset

main
Dima Krasner 2022-07-25 08:14:33 +03:00 committed by Leonardo Hernández
parent 7eee0a8229
commit 9d2eb8483b
1 changed files with 2 additions and 1 deletions

3
dwl.c
View File

@ -1436,7 +1436,8 @@ mapnotify(struct wl_listener *listener, void *data)
/* Set the same monitor and tags than its parent */
c->isfloating = 1;
wlr_scene_node_reparent(c->scene, layers[LyrFloat]);
setmon(c, p->mon, p->tags);
/* TODO recheck if !p->mon is possible with wlroots 0.16.0 */
setmon(c, p->mon ? p->mon : selmon, p->tags);
} else {
applyrules(c);
}