[VersionControl] Fixed null reference exception.