From 84ffb703e160f9f48781847823bfa9624bc98118 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Tue, 1 Apr 2014 01:47:41 +0200 Subject: [PATCH] Fix pathfinding crash --- Aquaria/PathFinding.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Aquaria/PathFinding.cpp b/Aquaria/PathFinding.cpp index df0bcae..30cf068 100644 --- a/Aquaria/PathFinding.cpp +++ b/Aquaria/PathFinding.cpp @@ -58,6 +58,8 @@ void PathFinding::forceMinimumPath(VectorPath &path, const Vector &start, const void PathFinding::molestPath(VectorPath &path) { int sz=path.getNumPathNodes(); + if(!sz) + return; int i = 0; // make normals