diff --git a/src/protocols/GammaControl.cpp b/src/protocols/GammaControl.cpp index 58382de98..385de7b31 100644 --- a/src/protocols/GammaControl.cpp +++ b/src/protocols/GammaControl.cpp @@ -179,7 +179,7 @@ void CGammaControlProtocol::onManagerResourceDestroy(wl_resource* res) { } void CGammaControlProtocol::destroyGammaControl(CGammaControl* gamma) { - std::erase_if(m_gammaControllers, [&](const auto& other) { return other.get() == gamma; }); + std::erase_if(m_gammaControllers, [&](const auto& other) { return other->getMonitor() == gamma->getMonitor(); }); } void CGammaControlProtocol::onGetGammaControl(CZwlrGammaControlManagerV1* pMgr, uint32_t id, wl_resource* output) {