mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 06:50:10 +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();
|
||||
});
|
||||
|
||||
PROTO::fractional->sendScale(surface_, pMonitor_->m_scale);
|
||||
if (m_monitor)
|
||||
PROTO::fractional->sendScale(surface_, m_monitor->m_scale);
|
||||
|
||||
sendConfigure();
|
||||
|
||||
|
|
@ -73,6 +74,11 @@ CSessionLockSurface::~CSessionLockSurface() {
|
|||
}
|
||||
|
||||
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()));
|
||||
m_resource->sendConfigure(SERIAL, m_monitor->m_size.x, m_monitor->m_size.y);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue