diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-11 12:09:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-11 12:10:19 +0300 |
commit | bc88ee329256d903308e67071c2edc2c8f32376d (patch) | |
tree | 2905a9a0687b6400ccfdc8a721f9d5fc3be9ef37 /source/blender/makesrna/intern/rna_ui.c | |
parent | d5d626df236b17c2d4ac731b2aaace52a2611304 (diff) |
Error in last commit, problems with unregister
We can't free the identifier before its used when
removing from the ghash.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 54b82fc89d6..64b41ac789f 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -177,9 +177,9 @@ static void rna_Panel_unregister(Main *UNUSED(bmain), StructRNA *type) return; RNA_struct_free_extension(type, &pt->ext); + RNA_struct_free(&BLENDER_RNA, type); BLI_freelinkN(&art->paneltypes, pt); - RNA_struct_free(&BLENDER_RNA, type); /* update while blender is running */ WM_main_add_notifier(NC_WINDOW, NULL); @@ -455,11 +455,10 @@ static void rna_UIList_unregister(Main *UNUSED(bmain), StructRNA *type) return; RNA_struct_free_extension(type, &ult->ext); + RNA_struct_free(&BLENDER_RNA, type); WM_uilisttype_freelink(ult); - RNA_struct_free(&BLENDER_RNA, type); - /* update while blender is running */ WM_main_add_notifier(NC_WINDOW, NULL); } @@ -551,9 +550,9 @@ static void rna_Header_unregister(Main *UNUSED(bmain), StructRNA *type) return; RNA_struct_free_extension(type, &ht->ext); + RNA_struct_free(&BLENDER_RNA, type); BLI_freelinkN(&art->headertypes, ht); - RNA_struct_free(&BLENDER_RNA, type); /* update while blender is running */ WM_main_add_notifier(NC_WINDOW, NULL); @@ -673,11 +672,10 @@ static void rna_Menu_unregister(Main *UNUSED(bmain), StructRNA *type) return; RNA_struct_free_extension(type, &mt->ext); + RNA_struct_free(&BLENDER_RNA, type); WM_menutype_freelink(mt); - RNA_struct_free(&BLENDER_RNA, type); - /* update while blender is running */ WM_main_add_notifier(NC_WINDOW, NULL); } |