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
This commit is contained in:
parent
cddfd11581
commit
1e1d96f0a8
Notes:
blender-bot
2023-02-14 02:08:37 +01:00
Referenced by issue #86677, Blender crashes after pressing ctrl+shift+g in a new geo nodes tree
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue