diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-31 11:03:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-31 11:03:45 +0300 |
commit | 6d55b522feb61a6cc03d04cbc2fca23713964084 (patch) | |
tree | ca59c77a7db79e09d08b15f585fa90ae763f7a00 | |
parent | afaca68ea86edd921f40cf45c245eaf8b5fc053a (diff) | |
parent | 87608e66e174068f9471619a5fe153fd279c4947 (diff) |
Merge branch 'master' into blender2.8
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index caaf862a12f..3da0bdb6ca2 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -412,7 +412,6 @@ typedef struct bTheme { #define UI_THEMESPACE_START(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), &((btheme)->tbuts)) #define UI_THEMESPACE_END(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), (&((btheme)->tclip) + 1)) -/* for the moment only the name. may want to store options with this later */ typedef struct bAddon { struct bAddon *next, *prev; char module[64]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 755ba31c77a..1ae946fda9e 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -395,15 +395,17 @@ static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *p static bAddon *rna_userdef_addon_new(void) { + ListBase *addons_list = &U.addons; bAddon *bext = MEM_callocN(sizeof(bAddon), "bAddon"); - BLI_addtail(&U.addons, bext); + BLI_addtail(addons_list, bext); return bext; } -static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *path_cmp_ptr) +static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *bext_ptr) { - bAddon *bext = path_cmp_ptr->data; - if (BLI_findindex(&U.addons, bext) == -1) { + ListBase *addons_list = &U.addons; + bAddon *bext = bext_ptr->data; + if (BLI_findindex(addons_list, bext) == -1) { BKE_report(reports, RPT_ERROR, "Add-on is no longer valid"); return; } @@ -413,8 +415,8 @@ static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *path_cmp_p MEM_freeN(bext->prop); } - BLI_freelinkN(&U.addons, bext); - RNA_POINTER_INVALIDATE(path_cmp_ptr); + BLI_freelinkN(addons_list, bext); + RNA_POINTER_INVALIDATE(bext_ptr); } static bPathCompare *rna_userdef_pathcompare_new(void) |