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
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-31 04:54:11 +0300
committerHans Goudey <h.goudey@me.com>2022-03-31 04:54:11 +0300
commit762d3a48e860d3425fc45bb0a7d4b86fb8cc836b (patch)
treec6fdbaeae421ce7a25f8ca4dd33e31075e650f4e /source/blender/editors/space_node/drawnode.cc
parent49858bf52641831f22e1d5a85b10b8074a449a30 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_node/drawnode.cc')
-rw-r--r--source/blender/editors/space_node/drawnode.cc3
1 files changed, 1 insertions, 2 deletions
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);