Avoid crash in KWin on Session leave
BUG: 420077 - hunk of original commite8a1f8ecc
seems was lost duringa94be708e
merge, so restoring it again - add missing check Original Differential Revision: https://phabricator.kde.org/D28889
This commit is contained in:
parent
d71672a0d1
commit
307a9bc559
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue