diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-09-27 20:45:19 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-09-27 20:45:27 +0300 |
commit | e51b93473a24f3cddc9055d63d4ef6ed88eb0e9c (patch) | |
tree | 51831a2ee9e7b840a876b91610b6b662fab97f6e /source | |
parent | be985bdde27f817c4caeab281ca7b666b2bd3a3c (diff) |
Fix T70247 Crash on enter edit mode with UV editor opened
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 3 |
1 files changed, 3 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 77b9daa959d..6dc2f514f3a 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -1031,6 +1031,9 @@ void DRW_mesh_batch_cache_create_requested( GPU_BATCH_CLEAR_SAFE(cache->batch.edit_triangles); GPU_BATCH_CLEAR_SAFE(cache->batch.edit_lnor); GPU_BATCH_CLEAR_SAFE(cache->batch.edit_selection_faces); + for (int i = 0; i < cache->mat_len; i++) { + GPU_BATCH_CLEAR_SAFE(cache->surface_per_mat[i]); + } cache->batch_ready &= ~(MBC_SURFACE | MBC_SURFACE_WEIGHTS | MBC_EDIT_MESH_ANALYSIS | MBC_EDIT_TRIANGLES | MBC_EDIT_LNOR | MBC_EDIT_SELECTION_FACES); |