FormEditor: Check that widget and graphicsView still exist after timeout

Change-Id: Ie1c3ea49221611240e58d738dccc6e350866d640
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Michael Winkelmann
2020-11-26 23:19:20 +01:00
parent 013f2a9d73
commit 68e1247d99

View File

@@ -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);
});
}