AC_Avoidance: Dijkstra's ignores invalid polygon fences

This commit is contained in:
Randy Mackay 2019-07-07 07:23:24 +09:00 committed by Tom Pittenger
parent 614b0f6dc8
commit 655ddd4ab3

View File

@ -122,6 +122,9 @@ bool AP_OADijkstra::polygon_fence_enabled() const
if (fence == nullptr) { if (fence == nullptr) {
return false; return false;
} }
if (!fence->is_polygon_valid()) {
return false;
}
return ((fence->get_enabled_fences() & AC_FENCE_TYPE_POLYGON) > 0); return ((fence->get_enabled_fences() & AC_FENCE_TYPE_POLYGON) > 0);
} }