mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-14 10:17:20 +01:00
Properly break circular reference if a job gets cancelled while working
This commit is contained in:
parent
0f5158edeb
commit
b069d38265
@ -78,6 +78,10 @@ void VoxelJob::_execute() {
|
|||||||
while (!get_cancelled() && _in_tree && !_build_done && origpt == _build_phase_type && !should_return()) {
|
while (!get_cancelled() && _in_tree && !_build_done && origpt == _build_phase_type && !should_return()) {
|
||||||
execute_phase();
|
execute_phase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_in_tree) {
|
||||||
|
_chunk.unref();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoxelJob::execute_phase() {
|
void VoxelJob::execute_phase() {
|
||||||
|
Loading…
Reference in New Issue
Block a user