wl-compositor: don't send enter to defunct output globals

This commit is contained in:
Vaxry 2024-06-24 23:29:26 +02:00
parent 8a68199a0c
commit cff0123ce6

View file

@ -221,6 +221,11 @@ void CWLSurfaceResource::enter(SP<CMonitor> monitor) {
return; return;
} }
if (PROTO::outputs.at(monitor->szName)->isDefunct()) {
LOGM(ERR, "enter() called on a defunct output global");
return;
}
auto output = PROTO::outputs.at(monitor->szName)->outputResourceFrom(pClient); auto output = PROTO::outputs.at(monitor->szName)->outputResourceFrom(pClient);
if (!output || !output->getResource() || !output->getResource()->resource()) { if (!output || !output->getResource() || !output->getResource()->resource()) {