diff options
author | Robert Guetzkow <gitcommit@outlook.de> | 2020-05-15 19:17:38 +0300 |
---|---|---|
committer | Robert Guetzkow <gitcommit@outlook.de> | 2020-05-15 19:29:42 +0300 |
commit | 001d70eb2bfe94a48de6d104f9cc21de112d6ebe (patch) | |
tree | 1e17af2be87956f689e96630882f7672260bfa6d /source | |
parent | 9632a0620135b78339b7511b173f31e70427d4eb (diff) |
Fix T76277: Remove wrong cast in rna_NodeTree_update
This patch fixes T76277 by removing the incorrect cast from
`ptr->data` to `bNode`. The address of `ptr->owner_id` and
`ptr->data` both point to the node tree. Passing the node tree
incorrectly as a node into the `ED_node_tag_update_nodetree`
corrupts the data, because it attempts to set flags on the
node.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7747
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 5be3db37329..e9ad9d4b514 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -862,12 +862,11 @@ static bool rna_NodeTree_check(bNodeTree *ntree, ReportList *reports) static void rna_NodeTree_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { bNodeTree *ntree = (bNodeTree *)ptr->owner_id; - bNode *node = (bNode *)ptr->data; WM_main_add_notifier(NC_NODE | NA_EDITED, NULL); WM_main_add_notifier(NC_SCENE | ND_NODES, &ntree->id); - ED_node_tag_update_nodetree(bmain, ntree, node); + ED_node_tag_update_nodetree(bmain, ntree, NULL); } static bNode *rna_NodeTree_node_new(bNodeTree *ntree, |