qbsp: CreateBrushFaces: fix accessing empty winding in `w->clip(...)` expression

This commit is contained in:
Eric Wasylishen 2021-12-15 22:43:21 -07:00
parent 2c7c879034
commit d6a17d022c
1 changed files with 2 additions and 0 deletions

View File

@ -330,6 +330,8 @@ static face_t *CreateBrushFaces(const mapentity_t *src, hullbrush_t *hullbrush,
for (auto &mapface2 : hullbrush->faces) {
if (&mapface == &mapface2)
continue;
if (!w)
break;
// flip the plane, because we want to keep the back side
plane = -mapface2.plane;