[Bf-blender-cvs] [ef59c8295f0] master: Fix T98355: Line art crash when switch to mesh edit mode.

YimingWu noreply at git.blender.org
Wed May 25 14:44:15 CEST 2022


Commit: ef59c8295f0e04630a0cebae3bd4552d50cae2ba
Author: YimingWu
Date:   Wed May 25 20:40:57 2022 +0800
Branches: master
https://developer.blender.org/rBef59c8295f0e04630a0cebae3bd4552d50cae2ba

Fix T98355: Line art crash when switch to mesh edit mode.

This fix will ensure not to load any meshes that's being edited, thus
avoiding crashes.

Ref D15022

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

M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c

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

diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 2d3e37e5723..016b70cedb0 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -2362,6 +2362,11 @@ static void lineart_object_load_single_instance(LineartRenderBuffer *rb,
   }
   if (ob->type == OB_MESH) {
     use_mesh = BKE_object_get_evaluated_mesh(ob);
+    if (use_mesh->edit_mesh) {
+      /* If the object is being edited, then the mesh is not evaluated fully into the final
+       * result, do not load them. */
+      return;
+    }
   }
   else {
     use_mesh = BKE_mesh_new_from_object(depsgraph, ob, true, true);



More information about the Bf-blender-cvs mailing list