mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 16:30:03 +01:00
sessionlock: fix crash when sendScale is called on a disconnected (#12171)
This commit is contained in:
parent
5e6cec962c
commit
8e9add2afd
1 changed files with 7 additions and 1 deletions
|
|
@ -57,7 +57,8 @@ CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_,
|
||||||
m_surface.reset();
|
m_surface.reset();
|
||||||
});
|
});
|
||||||
|
|
||||||
PROTO::fractional->sendScale(surface_, pMonitor_->m_scale);
|
if (m_monitor)
|
||||||
|
PROTO::fractional->sendScale(surface_, m_monitor->m_scale);
|
||||||
|
|
||||||
sendConfigure();
|
sendConfigure();
|
||||||
|
|
||||||
|
|
@ -73,6 +74,11 @@ CSessionLockSurface::~CSessionLockSurface() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSessionLockSurface::sendConfigure() {
|
void CSessionLockSurface::sendConfigure() {
|
||||||
|
if (!m_monitor) {
|
||||||
|
LOGM(ERR, "sendConfigure: monitor is gone");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->seatResourceForClient(m_resource->client()));
|
const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->seatResourceForClient(m_resource->client()));
|
||||||
m_resource->sendConfigure(SERIAL, m_monitor->m_size.x, m_monitor->m_size.y);
|
m_resource->sendConfigure(SERIAL, m_monitor->m_size.x, m_monitor->m_size.y);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue