QmlDesigner: Fix crash

The action seems to be null in some cases.
Keeping the QTC_ASSERT, because this is unexpected.

Task-number: QTCREATORBUG-23114
Change-Id: Id73111077c3e0b70f484600cbfb1b932aaf34945
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-12-02 16:17:18 +01:00
committed by Tim Jenssen
parent f14c591464
commit fa3f54ad1a

View File

@@ -183,6 +183,7 @@ void FormEditorView::temporaryBlockView()
void FormEditorView::setupOption3DAction() void FormEditorView::setupOption3DAction()
{ {
QTC_ASSERT(m_formEditorWidget->option3DAction(), return);
auto import = Import::createLibraryImport("QtQuick3D", "1.0"); auto import = Import::createLibraryImport("QtQuick3D", "1.0");
auto action = m_formEditorWidget->option3DAction(); auto action = m_formEditorWidget->option3DAction();
if (model() && model()->hasImport(import, true, true)) { if (model() && model()->hasImport(import, true, true)) {