Fixed segfault on exit in case of chunk loaders are busy
This commit is contained in:
parent
4661ace697
commit
e5fd0582d6
@ -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(){
|
Chunks::~Chunks(){
|
||||||
for (size_t i = 0; i < volume; i++){
|
for (size_t i = 0; i < volume; i++){
|
||||||
delete chunks[i];
|
if (chunks[i])
|
||||||
|
chunks[i]->decref();
|
||||||
}
|
}
|
||||||
delete[] chunks;
|
delete[] chunks;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user