Commit: 1be4eba27bda31fef6f8c93c86e649fa7d2f8b4f
Author: Germano
Date:   Thu May 24 19:22:35 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB1be4eba27bda31fef6f8c93c86e649fa7d2f8b4f

Fix crash when entering the curve edit mode.

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

M       source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc

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

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc 
b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 17ca1733d42..2920db6939c 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -419,6 +419,14 @@ void updata_armature_edit_mode_pointers(const Depsgraph * 
/*depsgraph*/,
        armature_cow->edbo = armature_orig->edbo;
 }
 
+void updata_curve_edit_mode_pointers(const Depsgraph * /*depsgraph*/,
+       const ID *id_orig, ID *id_cow)
+{
+       const Curve *curve_orig = (const Curve *)id_orig;
+       Curve *curve_cow = (Curve *)id_cow;
+       curve_cow->editnurb = curve_orig->editnurb;
+}
+
 void updata_mesh_edit_mode_pointers(const Depsgraph *depsgraph,
                                     const ID *id_orig, ID *id_cow)
 {
@@ -455,6 +463,9 @@ void updata_edit_mode_pointers(const Depsgraph *depsgraph,
                case ID_ME:
                        updata_mesh_edit_mode_pointers(depsgraph, id_orig, 
id_cow);
                        break;
+               case ID_CU:
+                       updata_curve_edit_mode_pointers(depsgraph, id_orig, 
id_cow);
+                       break;
                default:
                        break;
        }
@@ -795,6 +806,12 @@ void discard_armature_edit_mode_pointers(ID *id_cow)
        armature_cow->edbo = NULL;
 }
 
+void discard_curve_edit_mode_pointers(ID *id_cow)
+{
+       Curve *curve_cow = (Curve *)id_cow;
+       curve_cow->editnurb = NULL;
+}
+
 void discard_mesh_edit_mode_pointers(ID *id_cow)
 {
        Mesh *mesh_cow = (Mesh *)id_cow;
@@ -819,6 +836,9 @@ void discard_edit_mode_pointers(ID *id_cow)
                case ID_ME:
                        discard_mesh_edit_mode_pointers(id_cow);
                        break;
+               case ID_CU:
+                       discard_curve_edit_mode_pointers(id_cow);
+                       break;
                default:
                        break;
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to