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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-03-18 18:47:14 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-03-18 19:15:42 +0300
commit1e1d96f0a87c7ad72d54ae00d9b4f93307aba5ad (patch)
treea842bd2cd5a6aed956de374f50b274682275341a
parentcddfd11581d0b373cb4476eab0a5afc2da1ab678 (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
-rw-r--r--source/blender/editors/space_node/node_select.c5
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");