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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-11 18:11:26 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-11 18:12:47 +0300
commitfaf7453b45aecace938fa671702dd62a0620c5b8 (patch)
treef416b3f28c0e0f925fa75728ab5adc9da3262b7a /source
parent05111d79d098376ce094058fbf2178e4ea418c38 (diff)
Fix crash in loading/applying static overrides of some nodal material.
No real idea why node's typeinfo is NULL here... but think we do not care much in that case, so just adding some NULL checks for now.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 72a34d35715..2031bb4e9d4 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1684,7 +1684,7 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
remove_animdata &= ntree && !(ntree->flag & NTREE_IS_LOCALIZED);
/* extra free callback */
- if (use_api_free_cb && node->typeinfo->freefunc_api) {
+ if (use_api_free_cb && node->typeinfo != NULL && node->typeinfo->freefunc_api) {
PointerRNA ptr;
RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
@@ -1711,7 +1711,7 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
BKE_animdata_fix_paths_remove((ID *)ntree, prefix);
}
- if (ntree->typeinfo->free_node_cache)
+ if (node->typeinfo != NULL && ntree->typeinfo->free_node_cache)
ntree->typeinfo->free_node_cache(ntree, node);
/* texture node has bad habit of keeping exec data around */
@@ -1721,7 +1721,7 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
}
}
- if (node->typeinfo->freefunc) {
+ if (node->typeinfo != NULL && node->typeinfo->freefunc) {
node->typeinfo->freefunc(node);
}