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

View File

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