Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-07 14:22:38 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-07 14:23:52 +0300
commita280867ac2ed924e25f72d020c004b83044a1f51 (patch)
tree407fcdd3d2333057c0e6ca7f8b24c2e76ca7b210 /source/blender/blenkernel/intern/material.c
parentaf50099b83e29f5cc87a3ff6518472fdc244af7d (diff)
Fix T62289: crash with texture paint slots and missing node group datablock.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 89e6fb073ad..05be84c14e6 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1039,7 +1039,7 @@ static int count_texture_nodes_recursive(bNodeTree *nodetree)
if (node->typeinfo->nclass == NODE_CLASS_TEXTURE && node->typeinfo->type == SH_NODE_TEX_IMAGE && node->id) {
tex_nodes++;
}
- else if (node->type == NODE_GROUP) {
+ else if (node->type == NODE_GROUP && node->id) {
/* recurse into the node group and see if it contains any textures */
tex_nodes += count_texture_nodes_recursive((bNodeTree *)node->id);
}
@@ -1074,7 +1074,7 @@ static void fill_texpaint_slots_recursive(bNodeTree *nodetree, bNode *active_nod
}
(*index)++;
}
- else if (node->type == NODE_GROUP) {
+ else if (node->type == NODE_GROUP && node->id) {
/* recurse into the node group and see if it contains any textures */
fill_texpaint_slots_recursive((bNodeTree *)node->id, active_node, ma, slots, index);
}