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-24 11:34:24 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-05-24 11:38:39 +0300
commit70a3b7e70ce145266b37d90f31d3f8e3faf50717 (patch)
tree09141f063019f4be6f2296f8098a764d8492cd59 /source/blender/depsgraph/intern/eval
parent2d05f91bea9a566c62a298243025a561b318c46b (diff)
Fix T55170 and T55167: Crash adding new curve
We do the same solution as we have for mesh_evaluated.
Diffstat (limited to 'source/blender/depsgraph/intern/eval')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc9
1 files changed, 9 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 c8b9702621e..17ca1733d42 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
@@ -49,6 +49,7 @@
#include "BLI_threads.h"
#include "BLI_string.h"
+#include "BKE_curve.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_layer.h"
@@ -680,6 +681,7 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
ListBase gpumaterial_backup;
ListBase *gpumaterial_ptr = NULL;
Mesh *mesh_evaluated = NULL;
+ CurveCache *curve_cache = NULL;
short base_flag = 0;
if (check_datablock_expanded(id_cow)) {
switch (id_type) {
@@ -729,6 +731,10 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
object->data = mesh_evaluated->id.orig_id;
}
}
+ /* Store curve cache and make sure we don't free it. */
+ curve_cache = object->curve_cache;
+ object->curve_cache = NULL;
+
/* Make a backup of base flags. */
base_flag = object->base_flag;
break;
@@ -764,6 +770,9 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
((Mesh *)mesh_evaluated->id.orig_id)->edit_btmesh;
}
}
+ if (curve_cache != NULL) {
+ object->curve_cache = curve_cache;
+ }
object->base_flag = base_flag;
}
return id_cow;