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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/node.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index fed982a8f1d..b8b57b6bac0 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -967,6 +967,11 @@ bNode *nodeAddNodeType(bNodeTree *ntree, int type, bNodeTree *ngroup, ID *id)
} else
ntype= node_get_type(ntree, type, id);
+ if(ntype == NULL) {
+ printf("nodeAddNodeType() error: '%d' type invalid\n", type);
+ return NULL;
+ }
+
node= MEM_callocN(sizeof(bNode), "new node");
BLI_addtail(&ntree->nodes, node);
node->typeinfo= ntype;