main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
Showing only changes of commit 15dd622a63 - Show all commits

View File

@ -494,10 +494,16 @@ void BKE_lnor_spacearr_init(MLoopNorSpaceArray *lnors_spacearr,
lnors_spacearr->mem = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__); lnors_spacearr->mem = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__);
} }
mem = lnors_spacearr->mem; mem = lnors_spacearr->mem;
lnors_spacearr->lspacearr = (MLoopNorSpace **)BLI_memarena_calloc( if (numLoops > 0) {
mem, sizeof(MLoopNorSpace *) * size_t(numLoops)); lnors_spacearr->lspacearr = (MLoopNorSpace **)BLI_memarena_calloc(
lnors_spacearr->loops_pool = (LinkNode *)BLI_memarena_alloc( mem, sizeof(MLoopNorSpace *) * size_t(numLoops));
mem, sizeof(LinkNode) * size_t(numLoops)); lnors_spacearr->loops_pool = (LinkNode *)BLI_memarena_alloc(
mem, sizeof(LinkNode) * size_t(numLoops));
}
else {
lnors_spacearr->lspacearr = nullptr;
lnors_spacearr->loops_pool = nullptr;
}
lnors_spacearr->spaces_num = 0; lnors_spacearr->spaces_num = 0;
} }