VCS: Assert pointer before using it

Change-Id: Idfc99f79c04473ee5d432cb64b6bfbdde2847802
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2015-04-14 22:52:56 +03:00
committed by Orgad Shaneh
parent d8ad33b54d
commit 24e3445a35

View File

@@ -250,9 +250,9 @@ VcsBaseEditorWidget *VcsBaseClientImpl::createVcsEditor(Core::Id kind, QString t
outputEditor = Core::EditorManager::openEditorWithContents(kind, &title, progressMsg.toUtf8());
outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue);
baseEditor = VcsBaseEditor::getVcsBaseEditor(outputEditor);
QTC_ASSERT(baseEditor, return 0);
connect(baseEditor, &VcsBaseEditorWidget::annotateRevisionRequested,
this, &VcsBaseClientImpl::annotateRevisionRequested);
QTC_ASSERT(baseEditor, return 0);
baseEditor->setSource(source);
if (codec)
baseEditor->setCodec(codec);