[Bf-blender-cvs] [3be5697b889] blender-v2.83-release: Fix T79737: ERROR ACCESS VIOLATION when switching to eevee rendered view

Aristotelis Dossas noreply at git.blender.org
Wed Sep 16 14:39:17 CEST 2020


Commit: 3be5697b889a9a3e677a504844e6b21eee0d753f
Author: Aristotelis Dossas
Date:   Thu Sep 10 14:31:17 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB3be5697b889a9a3e677a504844e6b21eee0d753f

Fix T79737: ERROR ACCESS VIOLATION when switching to eevee rendered view

This prevents Blender from crashing when switching
to rendered view and the grid_data is NULL in the
lightcache (due to possible corruption), by switching
to the fallback lightcache. The fix extends the solution
for possible corruption in the cube_data as well.

Fix T79737

Reviewed By: fclem
Differential Revision: https://developer.blender.org/D8835

===================================================================

M	source/blender/draw/engines/eevee/eevee_lightcache.c

===================================================================

diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index bb23e898f38..519753179da 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -381,8 +381,8 @@ LightCache *EEVEE_lightcache_create(const int grid_len,
 static bool eevee_lightcache_static_load(LightCache *lcache)
 {
   /* We use fallback if a texture is not setup and there is no data to restore it. */
-  if ((!lcache->grid_tx.tex && !lcache->grid_tx.data) ||
-      (!lcache->cube_tx.tex && !lcache->cube_tx.data)) {
+  if ((!lcache->grid_tx.tex && !lcache->grid_tx.data) || !lcache->grid_data ||
+      (!lcache->cube_tx.tex && !lcache->cube_tx.data) || !lcache->cube_data) {
     return false;
   }
   /* If cache is too big for this GPU. */



More information about the Bf-blender-cvs mailing list