[Bf-blender-cvs] [9c0f11344e7] master: Fix T90564: Crash when linking 2 node inputs
Philipp Oeser
noreply at git.blender.org
Tue Aug 10 15:46:46 CEST 2021
Commit: 9c0f11344e77eb4062ddb08502317d287cce4bc8
Author: Philipp Oeser
Date: Tue Aug 10 10:27:57 2021 +0200
Branches: master
https://developer.blender.org/rB9c0f11344e77eb4062ddb08502317d287cce4bc8
Fix T90564: Crash when linking 2 node inputs
Caused by {rB37570a73170e}.
Above commit wasnt taking into account that at this point the link could
still be NULL.
Maniphest Tasks: T90564
Differential Revision: https://developer.blender.org/D12180
===================================================================
M source/blender/blenkernel/intern/node.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index 4aec5a9e667..1bf95369794 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -2364,7 +2364,7 @@ bNodeLink *nodeAddLink(
ntree->update |= NTREE_UPDATE_LINKS;
}
- if (link->tosock->flag & SOCK_MULTI_INPUT) {
+ if (link != nullptr && link->tosock->flag & SOCK_MULTI_INPUT) {
link->multi_input_socket_index = node_count_links(ntree, link->tosock) - 1;
}
More information about the Bf-blender-cvs
mailing list