diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-10-09 00:26:40 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-10-09 00:26:40 +0100 |
| commit | bc299928ad5571300180eb8edb6742ed3bbf0282 (patch) | |
| tree | 4b98fc9ff65e95a126c116e3ecc00618a259e90b /src/protocols/core/Output.cpp | |
| parent | ac658500fbebe607f2db83f11c37f0a3a05ef734 (diff) | |
output/xdg-output: avoid sending events to released globals
ref #6835
Diffstat (limited to 'src/protocols/core/Output.cpp')
| -rw-r--r-- | src/protocols/core/Output.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/protocols/core/Output.cpp b/src/protocols/core/Output.cpp index 7b88e0a8..4047774a 100644 --- a/src/protocols/core/Output.cpp +++ b/src/protocols/core/Output.cpp @@ -47,7 +47,7 @@ SP<CWlOutput> CWLOutputResource::getResource() { } void CWLOutputResource::updateState() { - if (!monitor || (owner && owner->defunct)) + if (!monitor || !owner || owner->defunct) return; if (resource->version() >= 2) @@ -119,6 +119,9 @@ bool CWLOutputProtocol::isDefunct() { } void CWLOutputProtocol::sendDone() { + if (defunct) + return; + for (auto const& r : m_vOutputs) { r->resource->sendDone(); } |
