forked from qt-creator/qt-creator
QmlDesigner: fix crash at shutdown
Found at sentry https://the-qt-company-00.sentry.io/issues/4729592969
Change-Id: I3e4903eebf5d328361a04f276659bd143eed0925
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
(cherry picked from commit 4279bdb31c
)
This commit is contained in:
@@ -96,7 +96,8 @@ void TextEditorView::modelAboutToBeDetached(Model *model)
|
||||
{
|
||||
AbstractView::modelAboutToBeDetached(model);
|
||||
|
||||
m_widget->setTextEditor(nullptr);
|
||||
if (m_widget)
|
||||
m_widget->setTextEditor(nullptr);
|
||||
|
||||
// in case the user closed it explicit we do not want to do anything with the editor
|
||||
if (Core::ModeManager::currentModeId() == Core::Constants::MODE_DESIGN) {
|
||||
|
Reference in New Issue
Block a user