Commit 24e3445a authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

VCS: Assert pointer before using it



Change-Id: Idfc99f79c04473ee5d432cb64b6bfbdde2847802
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
parent d8ad33b5
...@@ -250,9 +250,9 @@ VcsBaseEditorWidget *VcsBaseClientImpl::createVcsEditor(Core::Id kind, QString t ...@@ -250,9 +250,9 @@ VcsBaseEditorWidget *VcsBaseClientImpl::createVcsEditor(Core::Id kind, QString t
outputEditor = Core::EditorManager::openEditorWithContents(kind, &title, progressMsg.toUtf8()); outputEditor = Core::EditorManager::openEditorWithContents(kind, &title, progressMsg.toUtf8());
outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue); outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue);
baseEditor = VcsBaseEditor::getVcsBaseEditor(outputEditor); baseEditor = VcsBaseEditor::getVcsBaseEditor(outputEditor);
QTC_ASSERT(baseEditor, return 0);
connect(baseEditor, &VcsBaseEditorWidget::annotateRevisionRequested, connect(baseEditor, &VcsBaseEditorWidget::annotateRevisionRequested,
this, &VcsBaseClientImpl::annotateRevisionRequested); this, &VcsBaseClientImpl::annotateRevisionRequested);
QTC_ASSERT(baseEditor, return 0);
baseEditor->setSource(source); baseEditor->setSource(source);
if (codec) if (codec)
baseEditor->setCodec(codec); baseEditor->setCodec(codec);
......
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