From e90286ae52a7080c3c01a96a28e2049bec230bb9 Mon Sep 17 00:00:00 2001
From: Sryder13 <sryder13@gmail.com>
Date: Fri, 14 Nov 2014 22:19:44 +0000
Subject: [PATCH] Fix the polyobject crash

---
 src/hardware/hw_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 0ae245855c..90bbea6fa8 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -2766,9 +2766,9 @@ static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, fixed_t fixedheight
 			v3d->tow = (FIXED_TO_FLOAT(-FixedMul(tempxsow, FINESINE(angle)) - FixedMul(tempytow, FINECOSINE(angle))));
 		}
 
-		v3d->x = FIXED_TO_FLOAT(polysector->lines[i]->v1->x);
+		v3d->x = FIXED_TO_FLOAT(polysector->vertices[i]->x);
 		v3d->y = height;
-		v3d->z = FIXED_TO_FLOAT(polysector->lines[i]->v1->y);
+		v3d->z = FIXED_TO_FLOAT(polysector->vertices[i]->y);
 	}
 
 
-- 
GitLab