mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-26 11:16:30 +00:00
check if monitor is null before setting gamma
fixes segfault on monitor disconnect when using wlsunset
This commit is contained in:
parent
a73afc66ab
commit
fd263041a0
1 changed files with 2 additions and 0 deletions
2
dwl.c
2
dwl.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue