Fix crash opening UI files

Add a null check, amending
aaa1376576.

Fixes: QTCREATORBUG-24241
Change-Id: I63e76b9d2dd10034b637f8f3cac5001b15b35d30
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Friedemann Kleint
2020-06-24 13:14:09 +02:00
parent f3c2f68c39
commit 2bc4d82d31

View File

@@ -8741,7 +8741,8 @@ BaseTextEditor *TextEditorFactoryPrivate::createEditorHelper(const TextDocumentP
textEditorWidget->setMarksVisible(m_marksVisible); textEditorWidget->setMarksVisible(m_marksVisible);
textEditorWidget->setParenthesesMatchingEnabled(m_paranthesesMatchinEnabled); textEditorWidget->setParenthesesMatchingEnabled(m_paranthesesMatchinEnabled);
textEditorWidget->setCodeFoldingSupported(m_codeFoldingSupported); textEditorWidget->setCodeFoldingSupported(m_codeFoldingSupported);
textEditorWidget->setOptionalActions(m_textEditorActionHandler->optionalActions()); if (m_textEditorActionHandler)
textEditorWidget->setOptionalActions(m_textEditorActionHandler->optionalActions());
BaseTextEditor *editor = m_editorCreator(); BaseTextEditor *editor = m_editorCreator();
editor->setDuplicateSupported(m_duplicatedSupported); editor->setDuplicateSupported(m_duplicatedSupported);