[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33993] trunk/blender/source/blender/ makesrna/intern: report & fix [#25447] SceneObjects null pointer dereference crash

Campbell Barton ideasman42 at gmail.com
Sun Jan 2 03:48:48 CET 2011


Revision: 33993
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33993
Author:   campbellbarton
Date:     2011-01-02 03:48:45 +0100 (Sun, 02 Jan 2011)

Log Message:
-----------
report & fix [#25447] SceneObjects null pointer dereference crash
from Dan Eicher (dna)

noticed sequence swap also wasn't checking for None.

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

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c	2011-01-02 02:11:38 UTC (rev 33992)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c	2011-01-02 02:48:45 UTC (rev 33993)
@@ -2933,7 +2933,7 @@
 	RNA_def_function_ui_description(func, "Link object to scene, run scene.update() after.");
 	RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
 	parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene.");
-	RNA_def_property_flag(parm, PROP_REQUIRED);
+	RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
 	parm= RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base.");
 	RNA_def_function_return(func, parm);
 
@@ -2941,7 +2941,7 @@
 	RNA_def_function_ui_description(func, "Unlink object from scene.");
 	RNA_def_function_flag(func, FUNC_USE_REPORTS);
 	parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene.");
-	RNA_def_property_flag(parm, PROP_REQUIRED);
+	RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
 
 	prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
 	RNA_def_property_struct_type(prop, "Object");

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c	2011-01-02 02:11:38 UTC (rev 33992)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c	2011-01-02 02:48:45 UTC (rev 33993)
@@ -66,7 +66,7 @@
 	func= RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
 	RNA_def_function_flag(func, FUNC_USE_REPORTS);
 	parm= RNA_def_pointer(func, "other", "Sequence", "Other", "");
-	RNA_def_property_flag(parm, PROP_REQUIRED);
+	RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
 }
 
 #endif





More information about the Bf-blender-cvs mailing list