diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-14 18:15:48 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-14 18:15:48 +0300 |
commit | e9b282617a93a50b9763bf5130325a0c553e165e (patch) | |
tree | c887917878039904f1851b7aa364968d44276ed7 /source | |
parent | 8437519d0282e4d6ccb2f22d042bcaba2ac7d603 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |