[Bf-blender-cvs] [e51b93473a2] master: Fix T70247 Crash on enter edit mode with UV editor opened

Clément Foucault noreply at git.blender.org
Fri Sep 27 20:11:07 CEST 2019


Commit: e51b93473a24f3cddc9055d63d4ef6ed88eb0e9c
Author: Clément Foucault
Date:   Fri Sep 27 19:45:19 2019 +0200
Branches: master
https://developer.blender.org/rBe51b93473a24f3cddc9055d63d4ef6ed88eb0e9c

Fix T70247 Crash on enter edit mode with UV editor opened

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

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 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);



More information about the Bf-blender-cvs mailing list