diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-05-03 18:45:25 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-05-05 13:34:15 +0000 |
commit | 8ad1643895f3f7fc60198b978e47454c3738f0fa (patch) | |
tree | 4b78134a75cede96ba09e37aa74cc6f3cdfaf42f /src/plugins/platforms/eglfs/deviceintegration | |
parent | ca222646ff7890cf6e2d0363ab547947055284f6 (diff) |
Fix crash in QEglFSKmsGbmCursor::setPos() when cursor is disabled
This happens when there are two screens (configured in the json file),
QT_QPA_EGLFS_HIDECURSOR is set, and the mouse moves to the secondary
screen: m_bo is null.
Pick-to: 5.15
Change-Id: I5cef9835e7c9a6a39264bf9a028bf1feeabc6995
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration')
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp index f715645be3..9dd430a4df 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp @@ -248,7 +248,7 @@ void QEglFSKmsGbmCursor::setPos(const QPoint &pos) } } else { int ret; - if (kmsScreen->isCursorOutOfRange()) { + if (kmsScreen->isCursorOutOfRange() && m_bo) { kmsScreen->setCursorOutOfRange(false); uint32_t handle = gbm_bo_get_handle(m_bo).u32; ret = drmModeSetCursor(kmsScreen->device()->fd(), kmsScreen->output().crtc_id, |