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:
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
index e4f2e8ef7f4..4d6fb328ad9 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
@@ -136,16 +136,18 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
search_link_ops_for_declarations(params, declaration.inputs().take_front(2));
const std::optional<CustomDataType> type = node_type_from_other_socket(params.other_socket());
+ if (!type) {
+ return;
+ }
+
if (params.in_out() == SOCK_IN) {
- if (type) {
- params.add_item(IFACE_("Attribute"), [node_type, type](LinkSearchOpParams &params) {
- bNode &node = params.add_node(node_type);
- node.custom1 = *type;
- params.update_and_connect_available_socket(node, "Attribute");
- });
- }
+ params.add_item(IFACE_("Attribute"), [node_type, type](LinkSearchOpParams &params) {
+ bNode &node = params.add_node(node_type);
+ node.custom1 = *type;
+ params.update_and_connect_available_socket(node, "Attribute");
+ });
}
- else if (type) {
+ else {
for (const SocketDeclarationPtr &socket_decl : declaration.outputs()) {
StringRefNull name = socket_decl->name();
params.add_item(IFACE_(name.c_str()), [node_type, name, type](LinkSearchOpParams &params) {