forked from qt-creator/qt-creator
Fix possible crash when looking for version control for directory
Task-number: QTCREATORBUG-9656 Change-Id: If8babdb942830bd11fe360a311c57b75312248be Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This commit is contained in:
@@ -287,8 +287,8 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
|
||||
}
|
||||
return versionControl;
|
||||
} else {
|
||||
InfoBar *infoBar = curDocument->infoBar();
|
||||
if (infoBar->canInfoBeAdded(vcsWarning)) {
|
||||
InfoBar *infoBar = curDocument ? curDocument->infoBar() : 0;
|
||||
if (infoBar && infoBar->canInfoBeAdded(vcsWarning)) {
|
||||
InfoBarEntry info(vcsWarning,
|
||||
tr("%1 repository was detected but %1 is not configured.")
|
||||
.arg(versionControl->displayName()),
|
||||
|
||||
Reference in New Issue
Block a user