Fix #107050: accessing nullptr after progress is canceled

This commit is contained in:
Weizhen Huang
2023-04-18 11:50:53 +02:00
parent 6e75581e65
commit 4d7a7ce67c
+3
View File
@@ -450,6 +450,9 @@ void LightManager::device_update_tree(Device *,
* More benchmarking is needed to determine what number works best. */
LightTree light_tree(scene, dscene, progress, 8);
LightTreeNode *root = light_tree.build(scene, dscene);
if (progress.get_cancel()) {
return;
}
/* We want to create separate arrays corresponding to triangles and lights,
* which will be used to index back into the light tree for PDF calculations. */