diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-03-14 01:07:55 +0300 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-03-14 01:07:55 +0300 |
commit | 24f72abf67c8c836e238484d261ae6d4aa45782b (patch) | |
tree | 39cbbbe143488e236f1f496af34a564c6e3455cb /source/blender/editors/space_node/node_intern.h | |
parent | 1e4010cad67a2bf6f80fa574ac16985e7c7a513e (diff) |
Fix for crashes due to links without fromnode pointers. This can happen with "unfinished" links created during the modal linking operator or when creating links from group tree inputs.
In addition don't store unfinished links in the nodetree->links list any more. This makes code a bit safer because all links in that list can be considered valid now. The temporary bNodeLinkDrag structs used by the modal linking operator are now also stored in a list in SpaceNode, so these links can be drawn too (this separation also allows different display of temporary links, e.g. currently they are drawn on top of all nodes).
Diffstat (limited to 'source/blender/editors/space_node/node_intern.h')
-rw-r--r-- | source/blender/editors/space_node/node_intern.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 086b59ae5fd..205cf099776 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -40,6 +40,20 @@ struct ARegionType; struct View2D; struct bContext; struct wmWindowManager; +struct bNode; +struct bNodeSocket; +struct bNodeLink; + +/* temp data to pass on to modal */ +typedef struct bNodeLinkDrag +{ + struct bNodeLinkDrag *next, *prev; + + struct bNode *node; + struct bNodeSocket *sock; + struct bNodeLink *link; + int in_out; +} bNodeLinkDrag; /* space_node.c */ ARegion *node_has_buttons_region(ScrArea *sa); |