diff --git a/src/modules/voxelformat/MCRFormat.cpp b/src/modules/voxelformat/MCRFormat.cpp index 8866245a3..e26cab2cb 100644 --- a/src/modules/voxelformat/MCRFormat.cpp +++ b/src/modules/voxelformat/MCRFormat.cpp @@ -212,6 +212,9 @@ voxel::RawVolume *MCRFormat::error(SectionVolumes &volumes) { } voxel::RawVolume* MCRFormat::finalize(SectionVolumes& volumes, int xPos, int zPos) { + if (volumes.empty()) { + return nullptr; + } // TODO: only merge connected y chunks - don't fill empty chunks - just a waste of memory voxel::RawVolume *merged = voxelutil::merge(volumes); for (voxel::RawVolume* v : volumes) {