diff options
author | Aristotelis Dossas <teldosas> | 2020-09-10 15:31:17 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-10 15:33:08 +0300 |
commit | 4a82d792b03b61baed6d70bed288291c72f1e3b8 (patch) | |
tree | 894688b0fc50dc7339f252058e488a8bb21cbda4 /source/blender/draw/engines | |
parent | 8d59f060ca73247b2265db04655eef9db0f1c06a (diff) |
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
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lightcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index f23cca41215..4904f34a00b 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -388,8 +388,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. */ |