diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/addon.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/addon.c b/source/blender/blenkernel/intern/addon.c index 689e0fb5ee6..a9bb193a7a1 100644 --- a/source/blender/blenkernel/intern/addon.c +++ b/source/blender/blenkernel/intern/addon.c @@ -53,9 +53,14 @@ bAddon *BKE_addon_new(void) return addon; } +bAddon *BKE_addon_find(ListBase *addon_list, const char *module) +{ + return BLI_findstring(addon_list, module, offsetof(bAddon, module)); +} + bAddon *BKE_addon_ensure(ListBase *addon_list, const char *module) { - bAddon *addon = BLI_findstring(addon_list, module, offsetof(bAddon, module)); + bAddon *addon = BKE_addon_find(addon_list, module); if (addon == NULL) { addon = BKE_addon_new(); BLI_strncpy(addon->module, module, sizeof(addon->module)); |