From 9778edbd6b23151d2c352e0a62099f5259f750d5 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 11 Oct 2022 14:31:48 +0200 Subject: [PATCH] Add missing repaintManager check This is likely a problem only after the 6.4 changes to move QQuickWidget composition from OpenGL to QRhi. Add an extra check to the condition when bailing out. In QWidgetPrivate (qwidget.cpp) all similar calls into the repaintManager are guarded by if (tlwExtra && tlwExtra->backingStore && tlwExtra->repaintManager) therefore it makes sense to perform the same check in the other file too. The assumption is that the check was not added here due to being outside of qwidget.cpp. Change-Id: Ic94d4e5153f4a194a997cd669b0f7c48c7932d97 Fixes: QTBUG-107166 Reviewed-by: Volker Hilsheimer Reviewed-by: Qt CI Bot (cherry picked from commit 2d381001dae9c5e590375232e7a95f245350e4ea) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/kernel/qwidgetrepaintmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp index 69ab7de1af7..19c94f22028 100644 --- a/src/widgets/kernel/qwidgetrepaintmanager.cpp +++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp @@ -126,7 +126,7 @@ void QWidgetPrivate::invalidateBackingStore(const T &r) return; QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData(); - if (!tlwExtra || !tlwExtra->backingStore) + if (!tlwExtra || !tlwExtra->backingStore || !tlwExtra->repaintManager) return; T clipped(r);