From 68e1247d99787ed97df34f72159f02c2879670b9 Mon Sep 17 00:00:00 2001 From: Michael Winkelmann Date: Thu, 26 Nov 2020 23:19:20 +0100 Subject: [PATCH] FormEditor: Check that widget and graphicsView still exist after timeout Change-Id: Ie1c3ea49221611240e58d738dccc6e350866d640 Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/formeditor/formeditorview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index e2ef632928d..bd11cc1d380 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -236,7 +236,8 @@ void FormEditorView::temporaryBlockView(int duration) timer->start(duration); connect(timer, &QTimer::timeout, this, [this]() { - m_formEditorWidget->graphicsView()->setUpdatesEnabled(true); + if (m_formEditorWidget && m_formEditorWidget->graphicsView()) + m_formEditorWidget->graphicsView()->setUpdatesEnabled(true); }); }