Fix crash fullscreen without clients

Pressing mod + e (togglefullscreen) in a tag without clients caused dwl
to crash because selclient() returned NULL
This commit is contained in:
Stivvo 2021-02-19 12:35:00 +01:00
parent 807b2ad2d6
commit 7187618d81

1
dwl.c
View File

@ -1034,6 +1034,7 @@ void
togglefullscreen(const Arg *arg) togglefullscreen(const Arg *arg)
{ {
Client *sel = selclient(); Client *sel = selclient();
if (sel)
setfullscreen(sel, !sel->isfullscreen); setfullscreen(sel, !sel->isfullscreen);
} }