From 2d381001dae9c5e590375232e7a95f245350e4ea 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 Pick-to: 6.4 Reviewed-by: Volker Hilsheimer Reviewed-by: Qt CI 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 4d5e4e6522..e83f9d4bb2 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);