mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Fixed segfault on exit in case of chunk loaders are busy
This commit is contained in:
parent
4661ace697
commit
e5fd0582d6
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue