diff --git a/source/core/nodebuilder/nodebuild_utility.cpp b/source/core/nodebuilder/nodebuild_utility.cpp index afc321668..9f6f7e674 100644 --- a/source/core/nodebuilder/nodebuild_utility.cpp +++ b/source/core/nodebuilder/nodebuild_utility.cpp @@ -115,11 +115,6 @@ void FNodeBuilder::MakeSegsFromSides () { int i, j; - if (Level.NumLines == 0) - { - I_Error ("Map is empty.\n"); - } - for (i = 0; i < Level.NumLines; ++i) { if (Level.Lines[i].sidedef[0] != NULL) diff --git a/source/core/sectorgeometry.cpp b/source/core/sectorgeometry.cpp index 29d27991a..62af2902a 100644 --- a/source/core/sectorgeometry.cpp +++ b/source/core/sectorgeometry.cpp @@ -456,6 +456,14 @@ bool SectorGeometry::MakeVertices2(unsigned int secnum, int plane, const FVector nexti:; } + if (lines.Size() == 0) + { + // nothing to generate. + auto& entry = data[secnum].planes[plane]; + entry.vertices.Clear(); + entry.texcoords.Clear(); + return true; + } FNodeBuilder::FLevel leveldata =