Commit 2ddd0251 authored by David Schulz's avatar David Schulz
Browse files

Editor: Fix crash on navigate back



Task-number: QTCREATORBUG-8080

Change-Id: I782fbdda6b2ec46b7b8f4f3e84855b99d1847e7d
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent e29f800c
......@@ -413,11 +413,12 @@ void EditorView::goBackInNavigationHistory()
while (m_currentNavigationHistoryPosition > 0) {
--m_currentNavigationHistoryPosition;
EditLocation location = m_navigationHistory.at(m_currentNavigationHistoryPosition);
IEditor *editor;
IEditor *editor = 0;
if (location.document) {
editor = em->activateEditorForDocument(this, location.document,
EditorManager::IgnoreNavigationHistory | EditorManager::ModeSwitch);
} else {
}
if (!editor) {
editor = em->openEditor(this, location.fileName, location.id,
EditorManager::IgnoreNavigationHistory | EditorManager::ModeSwitch);
if (!editor) {
......@@ -439,11 +440,12 @@ void EditorView::goForwardInNavigationHistory()
return;
++m_currentNavigationHistoryPosition;
EditLocation location = m_navigationHistory.at(m_currentNavigationHistoryPosition);
IEditor *editor;
IEditor *editor = 0;
if (location.document) {
editor = em->activateEditorForDocument(this, location.document,
EditorManager::IgnoreNavigationHistory | EditorManager::ModeSwitch);
} else {
}
if (!editor) {
editor = em->openEditor(this, location.fileName, location.id, EditorManager::IgnoreNavigationHistory);
if (!editor) {
//TODO
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment