From 4491598bdb1c693c9852eda00f2a5b6bc7760eba Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 23 Mar 2018 14:48:20 -0600 Subject: [PATCH] qbsp: fix qbsp crash when worldspawn has 0 brushes --- qbsp/qbsp.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 3e01f044..5f946d4f 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -43,8 +43,9 @@ ProcessEntity(mapentity_t *entity, const int hullnum) surface_t *surfs; node_t *nodes; - /* No map brushes means non-bmodel entity */ - if (!entity->nummapbrushes) + /* No map brushes means non-bmodel entity. + We need to handle worldspawn containing no brushes, though. */ + if (!entity->nummapbrushes && entity != pWorldEnt()) return; /*