From 70a47b14a998fa66024726a15bd67363e664c1ac Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Sun, 18 Oct 2015 09:05:18 +0200
Subject: [PATCH] return a start distance in case no cycle is set

---
 VectoCore/Models/Simulation/Impl/VehicleContainer.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/VectoCore/Models/Simulation/Impl/VehicleContainer.cs b/VectoCore/Models/Simulation/Impl/VehicleContainer.cs
index e49344a5e6..492cb064d9 100644
--- a/VectoCore/Models/Simulation/Impl/VehicleContainer.cs
+++ b/VectoCore/Models/Simulation/Impl/VehicleContainer.cs
@@ -267,7 +267,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
 
 		public Meter CycleStartDistance
 		{
-			get { return Road.CycleStartDistance; }
+			get { return Road == null ? 0.SI<Meter>() : Road.CycleStartDistance; }
 		}
 	}
 }
\ No newline at end of file
-- 
GitLab