Fix (unreported) Scene foreach_id callback skipping some NULL ID pointers.
Not sure how bad that was in practice, was likely harmless. But foreach_id logic should never decide to not process an ID pointer because its value is NULL. Callback code is expected to handle NULL pointers appropriately.
This commit is contained in:
@@ -889,19 +889,12 @@ static void scene_foreach_id(ID *id, LibraryForeachIDData *data)
|
||||
data, scene_foreach_layer_collection(data, &view_layer->layer_collections));
|
||||
|
||||
LISTBASE_FOREACH (FreestyleModuleConfig *, fmc, &view_layer->freestyle_config.modules) {
|
||||
if (fmc->script) {
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, fmc->script, IDWALK_CB_NOP);
|
||||
}
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, fmc->script, IDWALK_CB_NOP);
|
||||
}
|
||||
|
||||
LISTBASE_FOREACH (FreestyleLineSet *, fls, &view_layer->freestyle_config.linesets) {
|
||||
if (fls->group) {
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, fls->group, IDWALK_CB_USER);
|
||||
}
|
||||
|
||||
if (fls->linestyle) {
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, fls->linestyle, IDWALK_CB_USER);
|
||||
}
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, fls->group, IDWALK_CB_USER);
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, fls->linestyle, IDWALK_CB_USER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user