diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-02-01 16:07:51 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-02-01 16:07:51 +0300 |
commit | 73b4cb5c8941495b7956912a6d1f8f5ee4734175 (patch) | |
tree | 5e4eb743463f9ffad83ad48e1711f29db4c12dcf | |
parent | 781dd5edb5b74ecb417a16c28eab31483fc3d11a (diff) |
Fix some issues in new RNA diff code.
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 38149734bc2..8cf9bc7d39c 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -1444,6 +1444,12 @@ int rna_property_override_diff_default(PointerRNA *ptr_a, PointerRNA *ptr_b, equals = false; continue; } + else if (iter_a.ptr.type == NULL) { + /* NULL RNA pointer... */ + BLI_assert(iter_a.ptr.data == NULL); + BLI_assert(iter_b.ptr.data == NULL); + continue; + } PropertyRNA *propname = RNA_struct_name_property(iter_a.ptr.type); char propname_buff_a[256], propname_buff_b[256]; @@ -1475,10 +1481,10 @@ int rna_property_override_diff_default(PointerRNA *ptr_a, PointerRNA *ptr_b, } if (propname_a != propname_buff_a) { - MEM_freeN(propname_a); + MEM_SAFE_FREE(propname_a); } if (propname_b != propname_buff_b) { - MEM_freeN(propname_b); + MEM_SAFE_FREE(propname_b); } MEM_SAFE_FREE(extended_rna_path); |