Fix T100850: Regression: Gpencil: crash on material color and other properties change.
rBcd49fee74114 forgot to add proper support for calls to `ntreeAddTree` with a NULL Main (which should generate `NO_MAIN` ntrees).
This commit is contained in:
@@ -2569,7 +2569,7 @@ static bNodeTree *ntreeAddTree_do(
|
||||
* node groups and other tree types are created as library data.
|
||||
*/
|
||||
int flag = 0;
|
||||
if (is_embedded) {
|
||||
if (is_embedded || bmain == nullptr) {
|
||||
flag |= LIB_ID_CREATE_NO_MAIN;
|
||||
}
|
||||
bNodeTree *ntree = (bNodeTree *)BKE_libblock_alloc(bmain, ID_NT, name, flag);
|
||||
|
Reference in New Issue
Block a user