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: https://phabricator.kde.org/D28889
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) {
return;
}
QImage cursorImage = Cursors::self()->currentCursor()->image();
if (cursorImage.isNull()) {
return;
......
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