Merge pull request #66784 from Geekotron/fix-nav3d-not-reachable-crash

Fix crash in navigation 3d when target is not reachable
This commit is contained in:
Rémi Verschelde 2022-10-03 09:26:26 +02:00
commit 9d62d59293

View file

@ -238,6 +238,7 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
to_visit.clear(); to_visit.clear();
to_visit.push_back(0); to_visit.push_back(0);
least_cost_id = 0; least_cost_id = 0;
prev_least_cost_id = -1;
reachable_end = nullptr; reachable_end = nullptr;