From 062814cad0d4ecaf8d572101cfe90678cb5f268c Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 13 Mar 2024 01:41:48 -0400 Subject: [PATCH] don't try to write lightmap if it has no styles --- light/write.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/light/write.cc b/light/write.cc index 4f8ca918..b8121fab 100644 --- a/light/write.cc +++ b/light/write.cc @@ -795,6 +795,10 @@ void SaveLightmapSurface(const mbsp_t *bsp, mface_t *face, facesup_t *facesup, const int output_width = output_extents.width(); const int output_height = output_extents.height(); + if (id.sorted.empty()) { + return; // no styles to write + } + Q_assert(id.lightofs >= 0); /* update face info (either core data or supplementary stuff) */