From 561d5a3d8be5685b716d10807d3a181d2acc75b1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 10 Mar 2019 19:07:48 +0100 Subject: [PATCH] - fixed: IsPointInLevel must explicitly check for minisegs, which can be one-sided on maps with unclosed sectors. Obviously, in such a case it is impossible to decide whether a point is really inside the map, so if this happens, behavior is undefined. --- src/g_level.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_level.cpp b/src/g_level.cpp index 02eaa56e9..66a8b9c57 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -2142,9 +2142,9 @@ int IsPointInMap(FLevelLocals *Level, double x, double y, double z) for (uint32_t i = 0; i < subsector->numlines; i++) { - // Skip single sided lines. + // Skip double sided lines. seg_t *seg = subsector->firstline + i; - if (seg->backsector != nullptr) continue; + if (seg->backsector != nullptr || seg->linedef == nullptr) continue; divline_t dline; P_MakeDivline(seg->linedef, &dline);