From: Mirko Vogt Date: Sun, 3 Dec 2017 21:20:12 +0000 (+0100) Subject: qt5base: fix segfault if QT_QPA_FB_HIDECURSOR=1 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ae7d0f7d24874c421e5834660b9f0f4c5c806f9d;p=feed%2Fvideo.git qt5base: fix segfault if QT_QPA_FB_HIDECURSOR=1 --- diff --git a/frameworks/qt5base/patches/005-fix-segv-if-no-cursor.patch b/frameworks/qt5base/patches/005-fix-segv-if-no-cursor.patch new file mode 100644 index 0000000..5c78d8f --- /dev/null +++ b/frameworks/qt5base/patches/005-fix-segv-if-no-cursor.patch @@ -0,0 +1,32 @@ +From a51a71ba6b08fcd761d5b0547bcd5d65f341d837 Mon Sep 17 00:00:00 2001 +From: Mirko Vogt +Date: Mon, 27 Nov 2017 20:25:38 +0100 +Subject: [PATCH 1/2] QFbCursor::pointerEvent(): Fix SEGV if + QT_QPA_FB_HIDECURSOR is set + +getCurrentRect() accesses mCursorImage.image() which is NULL in case of +QT_QPA_FB_HIDECURSOR=1. +Avoid respective calls in pointerEvent() by returning early in such +case. + +Signed-off-by: Mirko Vogt +--- + src/platformsupport/fbconvenience/qfbcursor.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/platformsupport/fbconvenience/qfbcursor.cpp b/src/platformsupport/fbconvenience/qfbcursor.cpp +index 7daf3f4d0c..c7b1a71c04 100644 +--- a/src/platformsupport/fbconvenience/qfbcursor.cpp ++++ b/src/platformsupport/fbconvenience/qfbcursor.cpp +@@ -112,6 +112,8 @@ void QFbCursor::pointerEvent(const QMouseEvent &e) + if (e.type() != QEvent::MouseMove) + return; + m_pos = e.screenPos().toPoint(); ++ if (!mVisible) ++ return; + mCurrentRect = getCurrentRect(); + if (mOnScreen || mScreen->geometry().intersects(mCurrentRect.translated(mScreen->geometry().topLeft()))) + setDirty(); +-- +2.15.0 +