Nodes: fix crash after undo after recent multi-input-socket changes

The issue is that the `last_node_hovered_while_dragging_a_link` pointer is invalidated on undo.
The pointer does not have to be on the space runtime data, because it only needs to exist
as long as the operator is running.

Differential Revision: https://developer.blender.org/D10726
This commit is contained in:
2021-03-15 15:41:41 +01:00
parent 3618948df8
commit cf5cada6b2
2 changed files with 5 additions and 4 deletions

View File

@@ -60,6 +60,8 @@ typedef struct bNodeLinkDrag {
/** Temporarily stores the last picked link from multi input socket operator. */
struct bNodeLink *last_picked_multi_input_socket_link;
struct bNode *last_node_hovered_while_dragging_a_link;
} bNodeLinkDrag;
typedef struct SpaceNode_Runtime {
@@ -77,7 +79,6 @@ typedef struct SpaceNode_Runtime {
/* XXX hack for translate_attach op-macros to pass data from transform op to insert_offset op */
/** Temporary data for node insert offset (in UI called Auto-offset). */
struct NodeInsertOfsData *iofsd;
struct bNode *last_node_hovered_while_dragging_a_link;
} SpaceNode_Runtime;
/* space_node.c */