Cancel the job if complete is false.

This commit is contained in:
Relintai 2020-08-04 09:49:58 +02:00
parent bf58b94a99
commit 10b588f576

View File

@ -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);
}
}