diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-23 09:10:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-23 09:10:45 +0300 |
commit | 58a4c767a14b60b903fbe5c5e7e960c57212faeb (patch) | |
tree | 8483aebad87ecc50cdeb8f76e861c755efb2cbd7 /source/blender/makesrna/intern/rna_animation.c | |
parent | 9cfb72ff81a36c26f4b611ec733432968f15a2de (diff) | |
parent | b8d77c44f112cae1e98308ff33ce055ea4fb46ff (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index f49d4717ad6..6bd04fda3d2 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -271,9 +271,13 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v /* check if we have registered this info before, and remove it */ ksi = ANIM_keyingset_info_find_name(dummyksi.idname); - if (ksi && ksi->ext.srna) + if (ksi && ksi->ext.srna) { rna_KeyingSetInfo_unregister(bmain, ksi->ext.srna); - + } + if (!RNA_struct_available_or_report(reports, identifier)) { + return NULL; + } + /* create a new KeyingSetInfo type */ ksi = MEM_callocN(sizeof(KeyingSetInfo), "python keying set info"); memcpy(ksi, &dummyksi, sizeof(KeyingSetInfo)); |