forked from qt-creator/qt-creator
Fix crash when closing QML files
Reviewed-by: Thomas Hartmann Task-number: QTCREATORBUG-4459
This commit is contained in:
@@ -201,7 +201,7 @@ void DesignDocumentController::blockModelSync(bool block)
|
|||||||
attachNodeInstanceView();
|
attachNodeInstanceView();
|
||||||
QmlModelState state;
|
QmlModelState state;
|
||||||
//We go back to base state (and back again) to avoid side effects from text editing.
|
//We go back to base state (and back again) to avoid side effects from text editing.
|
||||||
if (m_d->statesEditorView) {
|
if (m_d->statesEditorView && m_d->statesEditorView->model()) {
|
||||||
state = m_d->statesEditorView->currentState();
|
state = m_d->statesEditorView->currentState();
|
||||||
m_d->statesEditorView->setCurrentState(m_d->statesEditorView->baseState());
|
m_d->statesEditorView->setCurrentState(m_d->statesEditorView->baseState());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user