diff options
| author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-25 11:33:54 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-26 21:56:10 -0600 | 
| commit | 8ec5e52e061cfefab0bfed354a8b98ea2f4fb775 (patch) | |
| tree | cdd93d2117fe86f1105c76539bbe6b76723c9fd7 /dwl.c | |
| parent | c5275ca571b0824d81f49c156b33217deceb9eed (diff) | |
fix crash when a client is created while all outputs are disabled
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| @@ -800,8 +800,10 @@ commitnotify(struct wl_listener *listener, void *data)  		 * a wrong monitor.  		 */  		applyrules(c); -		wlr_surface_set_preferred_buffer_scale(client_surface(c), (int)ceilf(c->mon->wlr_output->scale)); -		wlr_fractional_scale_v1_notify_scale(client_surface(c), c->mon->wlr_output->scale); +		if (c->mon) { +			wlr_surface_set_preferred_buffer_scale(client_surface(c), (int)ceilf(c->mon->wlr_output->scale)); +			wlr_fractional_scale_v1_notify_scale(client_surface(c), c->mon->wlr_output->scale); +		}  		setmon(c, NULL, 0); /* Make sure to reapply rules in mapnotify() */  		wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel, WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN); | 
