diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-04-11 11:35:04 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-04-11 11:35:04 +0400 |
commit | ff6867a768674353fb8bbd5c6e7b418a9fa1ad80 (patch) | |
tree | 97f2eb699da68c829b198d43bd90875dd4a55284 /source | |
parent | 84232f8d5a754ece4e73eae6f38c600c16fd8278 (diff) |
Fix #30904: MovieClip.objects.new() segfault when no name is passed
Made name property required for new().
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 27983b142ec..56222c67a23 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -1351,7 +1351,8 @@ static void rna_def_trackingObjects(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_trackingObject_new"); RNA_def_function_ui_description(func, "Add tracking object to this movie clip"); - RNA_def_string(func, "name", "", 0, "", "Name of new object"); + parm = RNA_def_string(func, "name", "", 0, "", "Name of new object"); + RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "object", "MovieTrackingObject", "", "New motion tracking object"); RNA_def_function_return(func, parm); |