check client_from_wlr_surface() returning NULL in urgent()

fix #281
This commit is contained in:
Leonardo Hernández Hernández 2022-07-30 14:44:17 -05:00
parent 9d2eb8483b
commit 662e06e68e
Failed to generate hash of commit

2
dwl.c
View file

@ -2377,7 +2377,7 @@ urgent(struct wl_listener *listener, void *data)
{ {
struct wlr_xdg_activation_v1_request_activate_event *event = data; struct wlr_xdg_activation_v1_request_activate_event *event = data;
Client *c = client_from_wlr_surface(event->surface); Client *c = client_from_wlr_surface(event->surface);
if (c != selclient()) { if (c && c != selclient()) {
c->isurgent = 1; c->isurgent = 1;
printstatus(); printstatus();
} }