Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano <germano.costa@ig.com.br>2018-05-25 01:22:35 +0300
committerGermano <germano.costa@ig.com.br>2018-05-25 01:22:35 +0300
commit1be4eba27bda31fef6f8c93c86e649fa7d2f8b4f (patch)
tree23d7a2e5b7662339f6c6ce25cf953e34262083a2
parenta0dbaf1d9db90a225bea723e0053241bcbc6a457 (diff)
Fix crash when entering the curve edit mode.
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc20
1 files changed, 20 insertions, 0 deletions
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;
}