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
This commit is contained in:
YimingWu
2022-05-25 20:40:57 +08:00
parent c980ed27f0
commit ef59c8295f

View File

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