From 001d70eb2bfe94a48de6d104f9cc21de112d6ebe Mon Sep 17 00:00:00 2001 From: Robert Guetzkow Date: Fri, 15 May 2020 18:17:38 +0200 Subject: 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 --- source/blender/makesrna/intern/rna_nodetree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/makesrna') 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, -- cgit v1.2.3