From 8ad1643895f3f7fc60198b978e47454c3738f0fa Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Sun, 3 May 2020 18:45:25 +0200 Subject: 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 --- .../platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs/deviceintegration') 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, -- cgit v1.2.3