Brush Assets: Remove local brushes from default startup file #120039

Merged
Hans Goudey merged 3 commits from HooglyBoogly/blender:brush-assets-remove-defaults into brush-assets-project 2024-03-29 17:01:24 +01:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit f264897222 - Show all commits

View File

@ -915,8 +915,10 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
LISTBASE_FOREACH (SpaceLink *, space_link, &area->spacedata) {
if (space_link->spacetype == SPACE_OUTLINER) {
SpaceOutliner *space_outliner = reinterpret_cast<SpaceOutliner *>(space_link);
BLI_mempool_destroy(space_outliner->treestore);
space_outliner->treestore = nullptr;
if (space_outliner->treestore) {
HooglyBoogly marked this conversation as resolved Outdated

I would check if (space_outliner->treestore != nullptr), it's fragile to depend on this existing in the .blend.

I would check `if (space_outliner->treestore != nullptr)`, it's fragile to depend on this existing in the .blend.

Oh, good point, thanks

Oh, good point, thanks
BLI_mempool_destroy(space_outliner->treestore);
space_outliner->treestore = nullptr;
}
}
}
}