monitor: don't call output_state_finish on buffer-less state clears

ref #4546
This commit is contained in:
Vaxry 2024-01-28 00:41:54 +00:00
parent 3e93fdf779
commit 9002657bcc

View file

@ -684,7 +684,11 @@ void CMonitor::updateMatrix() {
} }
void CMonitor::clearState() { void CMonitor::clearState() {
wlr_output_state_finish(&outputState); if (outputState.buffer)
wlr_output_state_finish(&outputState);
else // free(gamma_lut) should be unnecessary as it shouldn't be non-null for buffer-less commits?
pixman_region32_fini(&outputState.damage);
outputState = {0}; outputState = {0};
wlr_output_state_init(&outputState); wlr_output_state_init(&outputState);
} }