Commit cabef758 authored by Eike Ziller's avatar Eike Ziller
Browse files

Fix possible crash when looking for version control for directory



Task-number: QTCREATORBUG-9656

Change-Id: If8babdb942830bd11fe360a311c57b75312248be
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarJake Petroules <jake.petroules@petroules.com>
parent 52eb3c43
......@@ -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()),
......
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