diff options
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r-- | game/geoData.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp index 6c6f1df..e2b7f66 100644 --- a/game/geoData.cpp +++ b/game/geoData.cpp @@ -232,7 +232,11 @@ GeoData::walkUntil(const PointFace & from, const GlobalPosition2D to, const std: { auto f = from.face(this); if (!f.is_valid()) { - f = opposite_face_handle(findEntry(from.point, to)); + const auto entryEdge = findEntry(from.point, to); + if (!entryEdge.is_valid()) { + return; + } + f = opposite_face_handle(entryEdge); } FaceHandle previousFace; while (f.is_valid() && !op(f)) { |