diff options
Diffstat (limited to 'source/blender/blenkernel/intern/idtype.c')
-rw-r--r-- | source/blender/blenkernel/intern/idtype.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/idtype.c b/source/blender/blenkernel/intern/idtype.c index 6ef3817bc1c..44bf8f0e4db 100644 --- a/source/blender/blenkernel/intern/idtype.c +++ b/source/blender/blenkernel/intern/idtype.c @@ -489,6 +489,11 @@ void BKE_idtype_id_foreach_cache(struct ID *id, bNodeTree *nodetree = ntreeFromID(id); if (nodetree != NULL) { type_info = BKE_idtype_get_info_from_id(&nodetree->id); + if (type_info == NULL) { + /* Very old .blend file seem to have empty names for their embedded node trees, see + * `blo_do_versions_250()`. Assume those are nodetrees then. */ + type_info = BKE_idtype_get_info_from_idcode(ID_NT); + } if (type_info->foreach_cache != NULL) { type_info->foreach_cache(&nodetree->id, function_callback, user_data); } |