diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index e4019cce711..d273bfb96de 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -560,8 +560,7 @@ UserDef *BKE_blendfile_userdef_read_from_memory(const void *filebuf, UserDef *BKE_blendfile_userdef_from_defaults(void) { UserDef *userdef = MEM_mallocN(sizeof(*userdef), __func__); - - memcpy(userdef, &U_default, sizeof(UserDef)); + memcpy(userdef, &U_default, sizeof(*userdef)); /* Add-ons. */ { @@ -583,6 +582,14 @@ UserDef *BKE_blendfile_userdef_from_defaults(void) } } + /* Theme. */ + { + bTheme *btheme = MEM_mallocN(sizeof(*btheme), __func__); + memcpy(btheme, &U_theme_default, sizeof(*btheme)); + + BLI_addtail(&userdef->themes, btheme); + } + #ifdef WITH_PYTHON_SECURITY /* use alternative setting for security nuts * otherwise we'd need to patch the binary blob - startup.blend.c */ |