summaryrefslogtreecommitdiff
path: root/src/doom/p_sight.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/p_sight.c')
-rw-r--r--src/doom/p_sight.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/doom/p_sight.c b/src/doom/p_sight.c
index e192567b..79c1bb1d 100644
--- a/src/doom/p_sight.c
+++ b/src/doom/p_sight.c
@@ -173,7 +173,7 @@ boolean P_CrossSubsector (int num)
continue;
line->validcount = validcount;
-
+
v1 = line->v1;
v2 = line->v2;
s1 = P_DivlineSide (v1->x,v1->y, &strace);
@@ -194,6 +194,14 @@ boolean P_CrossSubsector (int num)
if (s1 == s2)
continue;
+ // Backsector may be NULL if this is an "impassible
+ // glass" hack line.
+
+ if (line->backsector == NULL)
+ {
+ return false;
+ }
+
// stop because it is not two sided anyway
// might do this after updating validcount?
if ( !(line->flags & ML_TWOSIDED) )