diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-09 08:39:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-09 08:39:47 +0400 |
commit | 9a6a791ff0c9b32f66831f5e09d7c283ac309b95 (patch) | |
tree | 0777f6caf5134d5d3e3babf7757340cb06d83686 /source/blender/makesrna/intern/rna_wm.c | |
parent | b7113002dbea417617e3ef655d42732ade16577e (diff) |
fix [#30865] Crash when browsing last operators in outliner (or by Python API)
Operator descriptions can be NULL pointers,
fix this by making use of PROP_NEVER_NULL flag, when its not set, generated string funcs will test for NULL.
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 80dad69f124..db77be8dc31 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1296,6 +1296,7 @@ static void rna_def_operator(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set"); /* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); /* check for NULL */ prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->flag"); @@ -1362,6 +1363,7 @@ static void rna_def_macro_operator(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set"); /* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); /* check for NULL */ prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->flag"); |