[Bf-blender-cvs] [e9b282617a9] master: Fix T64551 Crash on leaving local view on the shading tab

Clément Foucault noreply at git.blender.org
Tue May 14 17:15:58 CEST 2019


Commit: e9b282617a93a50b9763bf5130325a0c553e165e
Author: Clément Foucault
Date:   Tue May 14 17:15:48 2019 +0200
Branches: master
https://developer.blender.org/rBe9b282617a93a50b9763bf5130325a0c553e165e

Fix T64551 Crash on leaving local view on the shading tab

Was causing by garbage collection free the surf_per_mat_tris array.
The cache validate did not take care of ensuring the array was alloc again.

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

M	source/blender/draw/intern/draw_cache_impl_mesh.c

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

diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index bb171565f59..eb626e2f954 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -2084,6 +2084,10 @@ static bool mesh_batch_cache_valid(Mesh *me)
     return false;
   }
 
+  if (cache->mat_len != mesh_render_mat_len_get(me)) {
+    return false;
+  }
+
   return true;
 }



More information about the Bf-blender-cvs mailing list