gamma-control: fix crash on monitor disconnect (#7353)

This commit is contained in:
Maximilian Seidler 2024-08-15 16:08:54 +00:00 committed by GitHub
parent 0c56be74a3
commit 520e91238f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,7 +109,7 @@ CGammaControl::CGammaControl(SP<CZwlrGammaControlV1> resource_, wl_resource* out
} }
CGammaControl::~CGammaControl() { CGammaControl::~CGammaControl() {
if (!gammaTableSet || !pMonitor) if (!gammaTableSet || !pMonitor || !pMonitor->output)
return; return;
// reset the LUT if the client dies for whatever reason and doesn't unset the gamma // reset the LUT if the client dies for whatever reason and doesn't unset the gamma