]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/PathFinder.cs
Fixed path finder thrown exception when finding a path to the cell you are already at.
[chaz/carfire] / CarFire / CarFire / CarFire / PathFinder.cs
index 53e148d1f2cc713b29940cd2613df0ac5462bcfb..c37e51863d7ad4b4abe9b18c707de8a8126fcaf8 100644 (file)
@@ -129,7 +129,7 @@ namespace CarFire
                     List<Point> list = new List<Point>();\r
 \r
                     cell = cell.Parent;\r
-                    while (cell.Point != start)\r
+                    while (cell != null && cell.Point != start)\r
                     {\r
                         list.Add(cell.Point);\r
                         cell = cell.Parent;\r
This page took 0.018186 seconds and 4 git commands to generate.