From 520e91238f0e6e6990e6a0845d73d85012485525 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:08:54 +0000 Subject: [PATCH] gamma-control: fix crash on monitor disconnect (#7353) --- src/protocols/GammaControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/GammaControl.cpp b/src/protocols/GammaControl.cpp index 494d9862..4febffbb 100644 --- a/src/protocols/GammaControl.cpp +++ b/src/protocols/GammaControl.cpp @@ -109,7 +109,7 @@ CGammaControl::CGammaControl(SP 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