diff --git a/idle_inhibition.cpp b/idle_inhibition.cpp index f2d5026391..662c430b0e 100644 --- a/idle_inhibition.cpp +++ b/idle_inhibition.cpp @@ -101,7 +101,7 @@ void IdleInhibition::update(AbstractClient *client) // TODO: Don't honor the idle inhibitor object if the shell client is not // on the current activity (currently, activities are not supported). const bool visible = client->isShown(true) && client->isOnCurrentDesktop(); - if (visible && client->surface()->inhibitsIdle()) { + if (visible && client->surface() && client->surface()->inhibitsIdle()) { inhibit(client); } else { uninhibit(client); diff --git a/plugins/platforms/drm/drm_output.cpp b/plugins/platforms/drm/drm_output.cpp index 82eb518777..3190b6987e 100644 --- a/plugins/platforms/drm/drm_output.cpp +++ b/plugins/platforms/drm/drm_output.cpp @@ -80,12 +80,17 @@ void DrmOutput::teardown() } m_primaryPlane->setCurrent(nullptr); } + if (m_cursorPlane) { + m_cursorPlane->setOutput(nullptr); + } m_crtc->setOutput(nullptr); m_conn->setOutput(nullptr); delete m_cursor[0]; + m_cursor[0] = nullptr; delete m_cursor[1]; + m_cursor[1] = nullptr; if (!m_pageFlipPending) { deleteLater(); } //else will be deleted in the page flip handler diff --git a/wayland_server.cpp b/wayland_server.cpp index a84abcce17..3da05a491e 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -637,7 +637,7 @@ void WaylandServer::createInternalConnection() connect(m_internalConnection.client, &ConnectionThread::connected, this, [this] { Registry *registry = new Registry(this); - EventQueue *eventQueue = new EventQueue(this); + EventQueue *eventQueue = new EventQueue(registry); eventQueue->setup(m_internalConnection.client); registry->setEventQueue(eventQueue); registry->create(m_internalConnection.client);