Fix T58279: crush when load this scene _ with simple materials and simple objects.
Not sure why eevee's light_cache is NULL in that file, but this can be handled gracefully instead of crashing. ;)
This commit is contained in:
parent
cff0dfea9a
commit
a8c884c3ba
Notes:
blender-bot
2023-02-14 04:53:03 +01:00
Referenced by issue #58279, crush when load this scene _ with simple materials and simple objects
|
@ -6550,9 +6550,9 @@ static void direct_link_scene(FileData *fd, Scene *sce)
|
|||
else sce->eevee.light_cache = NULL;
|
||||
}
|
||||
else {
|
||||
/* else read the cache from file. */
|
||||
/* else try to read the cache from file. */
|
||||
sce->eevee.light_cache = newdataadr(fd, sce->eevee.light_cache);
|
||||
if (sce->eevee.light_cache) {
|
||||
sce->eevee.light_cache = newdataadr(fd, sce->eevee.light_cache);
|
||||
direct_link_lightcache(fd, sce->eevee.light_cache);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue