VOXELFORMAT: fixed assert if some tags don't include the expected data

master
Martin Gerhardy 2022-03-28 19:42:33 +02:00
parent ed587bc092
commit b8599feecc
1 changed files with 3 additions and 0 deletions

View File

@ -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) {