Avoid crash in KWin on Session leave
BUG: 420077 - hunk of original commitmastere8a1f8ecc
seems was lost duringa94be708e
merge, so restoring it again - add missing check Original Differential Revision: https://phabricator.kde.org/D28889
parent
d71672a0d1
commit
307a9bc559
|
@ -118,6 +118,10 @@ bool DrmOutput::showCursor(DrmDumbBuffer *c)
|
||||||
|
|
||||||
bool DrmOutput::showCursor()
|
bool DrmOutput::showCursor()
|
||||||
{
|
{
|
||||||
|
if (m_deleted) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (Q_UNLIKELY(m_backend->usesSoftwareCursor())) {
|
if (Q_UNLIKELY(m_backend->usesSoftwareCursor())) {
|
||||||
qCCritical(KWIN_DRM) << "DrmOutput::showCursor should never be called when software cursor is enabled";
|
qCCritical(KWIN_DRM) << "DrmOutput::showCursor should never be called when software cursor is enabled";
|
||||||
return true;
|
return true;
|
||||||
|
@ -174,6 +178,9 @@ QMatrix4x4 DrmOutput::matrixDisplay(const QSize &s) const
|
||||||
|
|
||||||
void DrmOutput::updateCursor()
|
void DrmOutput::updateCursor()
|
||||||
{
|
{
|
||||||
|
if (m_deleted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
QImage cursorImage = Cursors::self()->currentCursor()->image();
|
QImage cursorImage = Cursors::self()->currentCursor()->image();
|
||||||
if (cursorImage.isNull()) {
|
if (cursorImage.isNull()) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue