From 762d3a48e860d3425fc45bb0a7d4b86fb8cc836b Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 30 Mar 2022 20:54:11 -0500 Subject: Cleanup: Avoid storing pointers for attribute search callback It's better to use some local/stable identifiier to avoid relying on the data not being freed in between creating the search menu and the exec function. This is similar to c473b2ce8bdbf8fa. --- source/blender/editors/space_node/drawnode.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/editors/space_node/drawnode.cc') diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index c6839099827..958a9fdfc60 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -1302,8 +1302,7 @@ static void std_node_socket_draw( uiItemL(row, text, 0); if (socket_needs_attribute_search(*node, *sock)) { - const bNodeTree *node_tree = (const bNodeTree *)node_ptr->owner_id; - node_geometry_add_attribute_search_button(*C, *node_tree, *node, *ptr, *row); + node_geometry_add_attribute_search_button(*C, *node, *ptr, *row); } else { uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0); -- cgit v1.2.3