forked from qt-creator/qt-creator
Clang: Don't dereference nullptr
Change-Id: Ib36c2d18fd01684cad45042b9f1a6901a028b345 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Nikolai Kosjar
parent
530fc225fa
commit
d424fb36f1
@@ -182,9 +182,11 @@ OpenEditorAtCursorPosition::OpenEditorAtCursorPosition(const TestDocument &testD
|
||||
Core::IEditor *coreEditor = Core::EditorManager::openEditor(testDocument.filePath);
|
||||
m_editor = qobject_cast<TextEditor::BaseTextEditor *>(coreEditor);
|
||||
QTC_CHECK(m_editor);
|
||||
if (m_editor && testDocument.hasValidCursorPosition())
|
||||
m_editor->setCursorPosition(testDocument.cursorPosition);
|
||||
m_backendIsNotified = waitUntilBackendIsNotified();
|
||||
if (m_editor) {
|
||||
if (testDocument.hasValidCursorPosition())
|
||||
m_editor->setCursorPosition(testDocument.cursorPosition);
|
||||
m_backendIsNotified = waitUntilBackendIsNotified();
|
||||
}
|
||||
QTC_CHECK(m_backendIsNotified);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user