IdleTimePoller: Fix a crash at shutdown
Currently, kwin crashes at shutdown because the idle poller plugin is unloaded when exit handlers are run, after the waylandServer() is destroyed. This results in null dereferencing. BUG: 443268
This commit is contained in:
parent
8ac93a59ff
commit
85fb0e7c43
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ bool KWinIdleTimePoller::setUpPoller()
|
||||||
|
|
||||||
void KWinIdleTimePoller::unloadPoller()
|
void KWinIdleTimePoller::unloadPoller()
|
||||||
{
|
{
|
||||||
disconnect(waylandServer()->idle(), &KWaylandServer::IdleInterface::inhibitedChanged, this, &KWinIdleTimePoller::onInhibitedChanged);
|
if (waylandServer() && waylandServer()->idle()) {
|
||||||
|
disconnect(waylandServer()->idle(), &KWaylandServer::IdleInterface::inhibitedChanged, this, &KWinIdleTimePoller::onInhibitedChanged);
|
||||||
|
}
|
||||||
|
|
||||||
qDeleteAll(m_timeouts);
|
qDeleteAll(m_timeouts);
|
||||||
m_timeouts.clear();
|
m_timeouts.clear();
|
||||||
|
|
Loading…
Reference in a new issue