Fix T52628: own error in string duplication
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Sep 2017 15:59:07 +0000 (01:59 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Sep 2017 16:08:58 +0000 (02:08 +1000)
Error in 636baa598a56

source/blender/makesrna/intern/rna_define.c

index 2a6a3d06b153ca011c945336680addfcc76ef38f..0e91c1586693c2c7348dd6ec8e3915615c094c24 100644 (file)
@@ -3331,8 +3331,8 @@ void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
 void RNA_def_struct_duplicate_pointers(BlenderRNA *brna, StructRNA *srna)
 {
        if (srna->identifier) {
+               srna->identifier = BLI_strdup(srna->identifier);
                if (srna->flag & STRUCT_PUBLIC_NAMESPACE) {
-                       srna->identifier = BLI_strdup(srna->identifier);
                        BLI_ghash_replace_key(brna->structs_map, (void *)srna->identifier);
                }
        }