Commit cf801ea0 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Eike Ziller
Browse files

TextEditor: Fix crash

Introduced in dcba4a27



Occurs when invoking InsertVirtualMethods to implementation file, which
is not opened.

Change-Id: Icc84d63ddf28312eb77f2666166f609085d81d63
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent ae95a7b3
......@@ -393,7 +393,7 @@ void RefactoringFile::indentOrReindent(void (RefactoringChangesData::*mf)(const
QTextCursor selection(p.first.document());
selection.setPosition(p.first.position());
selection.setPosition(p.second.position(), QTextCursor::KeepAnchor);
((*m_data).*(mf))(selection, m_fileName, m_editor->baseTextDocument());
((*m_data).*(mf))(selection, m_fileName, m_editor ? m_editor->baseTextDocument() : 0);
}
}
......
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