gammactrl: fix potential crash on monitor removed (#7828)

This commit is contained in:
André Silva
2024-09-17 14:37:20 +01:00
committed by GitHub
parent 581f6659f8
commit 3c9716acfd

View File

@@ -19,7 +19,7 @@ CGammaControl::CGammaControl(SP<CZwlrGammaControlV1> resource_, wl_resource* out
pMonitor = OUTPUTRES->monitor; pMonitor = OUTPUTRES->monitor;
if (!pMonitor) { if (!pMonitor || !pMonitor->output) {
LOGM(ERR, "No CMonitor"); LOGM(ERR, "No CMonitor");
resource->sendFailed(); resource->sendFailed();
return; return;