diff options
| author | choc <notchoc@proton.me> | 2024-01-10 22:27:04 +0800 | 
|---|---|---|
| committer | choc <notchoc@proton.me> | 2024-01-11 17:17:57 +0800 | 
| commit | fd263041a00deb648c2e27daac942e86621b2855 (patch) | |
| tree | 9383e75235946ebfe04337f3930125f2af226db7 | |
| parent | a73afc66abdffe2668ea27130f447ae05efb04f0 (diff) | |
check if monitor is null before setting gamma
fixes segfault on monitor disconnect when using wlsunset
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 2 | 
1 files changed, 2 insertions, 0 deletions
| @@ -2076,6 +2076,8 @@ setgamma(struct wl_listener *listener, void *data)  {  	struct wlr_gamma_control_manager_v1_set_gamma_event *event = data;  	Monitor *m = event->output->data; +	if (!m) +		return;  	m->gamma_lut_changed = 1;  	wlr_output_schedule_frame(m->wlr_output);  } | 
