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);
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to