From d82384f7e1a0ae6fd3b27bb261a4cd671c9939ac Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 9 Feb 2022 12:36:20 +0100 Subject: Fix T95640: missing null check in previous commit --- source/blender/editors/space_node/node_relationships.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_node') diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc index 2a197e93f42..d92f86c2cfc 100644 --- a/source/blender/editors/space_node/node_relationships.cc +++ b/source/blender/editors/space_node/node_relationships.cc @@ -2453,12 +2453,12 @@ void ED_node_link_insert(Main *bmain, ScrArea *area) bNodeSocket *best_output = get_main_socket(ntree, *node_to_insert, SOCK_OUT); /* Ignore main sockets when the types don't match. */ - if (best_input != nullptr && + if (best_input != nullptr && ntree.typeinfo->validate_link != nullptr && !ntree.typeinfo->validate_link(static_cast(old_link->fromsock->type), static_cast(best_input->type))) { best_input = nullptr; } - if (best_output != nullptr && + if (best_output != nullptr && ntree.typeinfo->validate_link != nullptr && !ntree.typeinfo->validate_link(static_cast(best_output->type), static_cast(old_link->tosock->type))) { best_output = nullptr; -- cgit v1.2.3