diff --git a/common/polylib.cc b/common/polylib.cc index 409237f6..6397b310 100644 --- a/common/polylib.cc +++ b/common/polylib.cc @@ -223,6 +223,10 @@ polylib::BaseWindingForPlane(const vec3_t normal, const float dist) polylib::winding_t * polylib::CopyWinding(const winding_t * w) { + if (w == nullptr) { + return nullptr; + } + int size; winding_t *c; diff --git a/include/common/bspfile.hh b/include/common/bspfile.hh index e7dad3f1..01bd23c6 100644 --- a/include/common/bspfile.hh +++ b/include/common/bspfile.hh @@ -402,7 +402,7 @@ typedef struct { typedef struct { int32_t planenum; - int32_t side; + int32_t side; // if true, the face is on the back side of the plane int32_t firstedge; /* we must support > 64k edges */ int32_t numedges; int32_t texinfo;