Fixed segfault on exit in case of chunk loaders are busy

This commit is contained in:
MihailRis
2022-03-08 20:36:11 +03:00
committed by GitHub
parent 4661ace697
commit e5fd0582d6
+2 -1
View File
@@ -27,7 +27,8 @@ Chunks::Chunks(int w, int h, int d, int ox, int oy, int oz) : w(w), h(h), d(d),
Chunks::~Chunks(){
for (size_t i = 0; i < volume; i++){
delete chunks[i];
if (chunks[i])
chunks[i]->decref();
}
delete[] chunks;
}