diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-03-18 18:47:14 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-03-18 19:15:42 +0300 |
commit | 1e1d96f0a87c7ad72d54ae00d9b4f93307aba5ad (patch) | |
tree | a842bd2cd5a6aed956de374f50b274682275341a /source/blender/editors | |
parent | cddfd11581d0b373cb4476eab0a5afc2da1ab678 (diff) |
Fix T86677: select grouped in node editor crashes without active node
This was reported for geometry nodes, but was true for all nodetrees
(e.g. after deleting the active node). Geometry node trees just made
this more obvious since they start without an active node to begin with.
Fix provided by @lone_noel, thx!
Maniphest Tasks: T86677
Differential Revision: https://developer.blender.org/D10762
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/node_select.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 704b7350bb9..1da79671c8e 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -370,6 +370,11 @@ static int node_select_grouped_exec(bContext *C, wmOperator *op) { SpaceNode *snode = CTX_wm_space_node(C); bNode *node_act = nodeGetActive(snode->edittree); + + if (node_act == NULL) { + return OPERATOR_CANCELLED; + } + bNode *node; bool changed = false; const bool extend = RNA_boolean_get(op->ptr, "extend"); |