diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-06-13 13:52:14 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-06-13 13:52:14 +0400 |
commit | 85823bff0785ff785503ac2e488ef7a96bd537a2 (patch) | |
tree | 7f82db1389cd4b71945c4780865f9f3b08e9c1ec /source/blender | |
parent | 815a87a652c2f7177e606bfb9911d0711c49b992 (diff) |
Safety check for NodeTree.links.new function: Added NEVER_NULL flags to from_socket/to_socket arguments to make sure the function doesn't crash when passing None/NULL.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index a2bb1aff3b9..0bb6ec01333 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -6967,9 +6967,9 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Add a node link to this node tree"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "input", "NodeSocket", "", "The input socket"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); parm = RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); RNA_def_boolean(func, "verify_limits", TRUE, "Verify Limits", "Remove existing links if connection limit is exceeded"); /* return */ parm = RNA_def_pointer(func, "link", "NodeLink", "", "New node link"); |