[Bf-blender-cvs] [a8c884c3ba2] blender2.8: Fix T58279: crush when load this scene _ with simple materials and simple objects.
Bastien Montagne
noreply at git.blender.org
Fri Nov 30 10:46:44 CET 2018
Commit: a8c884c3ba288c45c9ebc0d5bb2bb9b7c7d17766
Author: Bastien Montagne
Date: Fri Nov 30 10:45:16 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBa8c884c3ba288c45c9ebc0d5bb2bb9b7c7d17766
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. ;)
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 229d0d04423..acf6ead7d96 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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);
}
}
More information about the Bf-blender-cvs
mailing list