backends/drm: fix cursor crash

This commit is contained in:
Xaver Hugl 2021-12-31 14:12:24 +01:00 committed by Luca Beltrame
parent 1d6de6a3a9
commit 5e75d2a095

View file

@ -92,7 +92,7 @@ static bool isCursorSpriteCompatible(const QImage *buffer, const QImage *sprite)
void DrmOutput::updateCursor()
{
if (!isEnabled() || !m_connector->isConnected()) {
if (!m_pipeline->pending.crtc) {
return;
}
const Cursor *cursor = Cursors::self()->currentCursor();
@ -155,7 +155,7 @@ void DrmOutput::updateCursor()
void DrmOutput::moveCursor()
{
if (!m_setCursorSuccessful) {
if (!m_setCursorSuccessful || !m_pipeline->pending.crtc) {
return;
}
Cursor *cursor = Cursors::self()->currentCursor();