[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57426] trunk/blender/source/blender/ makesrna/intern/rna_nodetree.c: 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.

Lukas Toenne lukas.toenne at googlemail.com
Thu Jun 13 11:52:14 CEST 2013


Revision: 57426
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57426
Author:   lukastoenne
Date:     2013-06-13 09:52:14 +0000 (Thu, 13 Jun 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_nodetree.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c	2013-06-13 09:12:53 UTC (rev 57425)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c	2013-06-13 09:52:14 UTC (rev 57426)
@@ -6967,9 +6967,9 @@
 	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");




More information about the Bf-blender-cvs mailing list