wlr_session_change_vt is NULL safe

This commit is contained in:
Devin J. Pohly 2020-08-16 11:32:45 -05:00
parent c970d97f85
commit 41c3f91b03

5
dwl.c
View file

@ -428,10 +428,7 @@ buttonpress(struct wl_listener *listener, void *data)
void void
chvt(const Arg *arg) chvt(const Arg *arg)
{ {
struct wlr_session *s = wlr_backend_get_session(backend); wlr_session_change_vt(wlr_backend_get_session(backend), arg->ui);
if (!s)
return;
wlr_session_change_vt(s, arg->ui);
} }
void void