Commit 307a9bc5 authored by Andrey Butirsky's avatar Andrey Butirsky Committed by David Edmundson
Browse files

Avoid crash in KWin on Session leave

BUG: 420077

- hunk of original commit e8a1f8ec seems was lost during a94be708 merge,
so restoring it again
- add missing check

Original Differential Revision:
parent d71672a0
......@@ -118,6 +118,10 @@ bool DrmOutput::showCursor(DrmDumbBuffer *c)
bool DrmOutput::showCursor()
if (m_deleted) {
return false;
if (Q_UNLIKELY(m_backend->usesSoftwareCursor())) {
qCCritical(KWIN_DRM) << "DrmOutput::showCursor should never be called when software cursor is enabled";
return true;
......@@ -174,6 +178,9 @@ QMatrix4x4 DrmOutput::matrixDisplay(const QSize &s) const
void DrmOutput::updateCursor()
if (m_deleted) {
QImage cursorImage = Cursors::self()->currentCursor()->image();
if (cursorImage.isNull()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment