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
path: root/source
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-07-15 13:43:03 +0300
committerJacques Lucke <jacques@blender.org>2021-07-15 13:43:59 +0300
commit2e8641e45e6bcb98fdb714cdae416b3570a2f47d (patch)
tree8f69c7136d5f813cc07057fecb320ae3602f308d /source
parentae30f72c80698be88a324445b8ba2269432f8db6 (diff)
Fix: crash when creating new node links
This was a regression in rBc27ef1e9e8e663e02173e518c1e669e9845b3d1f.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_node/node_edit.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc
index b1afd6549bc..af9c888cbf7 100644
--- a/source/blender/editors/space_node/node_edit.cc
+++ b/source/blender/editors/space_node/node_edit.cc
@@ -1232,6 +1232,10 @@ int node_find_indicated_socket(
float node_link_dim_factor(const View2D *v2d, const bNodeLink *link)
{
+ if (link->fromsock == nullptr || link->tosock == nullptr) {
+ return 1.0f;
+ }
+
const float min_endpoint_distance = std::min(
std::max(BLI_rctf_length_x(&v2d->cur, link->fromsock->locx),
BLI_rctf_length_y(&v2d->cur, link->fromsock->locy)),