Fix #118184: crash deleting a material output node

Caused by 7e8fd2cc2c

Code added in above commit didnt take into account that we might have no
output node in the tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/118202
This commit is contained in:
Philipp Oeser
2024-02-13 13:07:27 +01:00
committed by Philipp Oeser
parent d2fbfe0ec0
commit cb37fe751b

View File

@@ -1202,7 +1202,9 @@ void ntreeGPUMaterialNodes(bNodeTree *localtree, GPUMaterial *mat)
LISTBASE_FOREACH (bNode *, node, &localtree->nodes) {
node->runtime->tmp_flag = -1;
}
iter_shader_to_rgba_depth_count(output, max_depth);
if (output != nullptr) {
iter_shader_to_rgba_depth_count(output, max_depth);
}
LISTBASE_FOREACH (bNode *, node, &localtree->nodes) {
if (node->type == SH_NODE_OUTPUT_AOV) {
iter_shader_to_rgba_depth_count(node, max_depth);