mirror of
https://github.com/Relintai/voxelman.git
synced 2025-01-25 15:09:18 +01:00
Cancel the job if complete is false.
This commit is contained in:
parent
bf58b94a99
commit
10b588f576
@ -31,10 +31,13 @@ void VoxelJob::set_chunk(const Ref<VoxelChunkDefault> &chunk) {
|
||||
}
|
||||
|
||||
void VoxelJob::chunk_exit_tree() {
|
||||
|
||||
_in_tree = false;
|
||||
|
||||
if (get_complete()) {
|
||||
_chunk.unref();
|
||||
} else {
|
||||
set_cancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user