forked from qt-creator/qt-creator
DocumentManager::setCurrentDesignDocument(): Check m_currentDesignDocument.
Fix a crash occurring when dropping a .js file onto the Widget Designer. Task-number: QTCREATORBUG-15903 Change-Id: I3e952df1483c5683fa7daa3a1f2fb8ebbbc1b491 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
committed by
Tim Jenssen
parent
a3b2809417
commit
ea0c23771c
@@ -283,7 +283,7 @@ void DocumentManager::setCurrentDesignDocument(Core::IEditor *editor)
|
|||||||
m_designDocumentHash.insert(editor, m_currentDesignDocument);
|
m_designDocumentHash.insert(editor, m_currentDesignDocument);
|
||||||
m_currentDesignDocument->setEditor(editor);
|
m_currentDesignDocument->setEditor(editor);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!m_currentDesignDocument.isNull()) {
|
||||||
m_currentDesignDocument->resetToDocumentModel();
|
m_currentDesignDocument->resetToDocumentModel();
|
||||||
m_currentDesignDocument.clear();
|
m_currentDesignDocument.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user