[Bf-blender-cvs] [03d258d6133] blender2.8: Copy on write: Prevent crash when duplicating object with particle system
Sergey Sharybin
noreply at git.blender.org
Thu Jul 27 16:30:20 CEST 2017
Commit: 03d258d61335cfca326543a3d13b082597cfba2a
Author: Sergey Sharybin
Date: Thu Jul 27 16:28:16 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB03d258d61335cfca326543a3d13b082597cfba2a
Copy on write: Prevent crash when duplicating object with particle system
Transform system was using global main, which might have been pointing to a
freed scene layer.
===================================================================
M source/blender/editors/transform/transform_conversions.c
===================================================================
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 06c38a8abcc..72218c4043f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5553,10 +5553,14 @@ static void set_trans_object_base_flags(TransInfo *t)
DEG_scene_relations_update(G.main, t->scene);
/* handle pending update events, otherwise they got copied below */
+ EvaluationContext eval_ctx;
+ DEG_evaluation_context_init_from_scene(&eval_ctx,
+ t->scene, t->scene_layer,
+ DAG_EVAL_VIEWPORT);
for (base = sl->object_bases.first; base; base = base->next) {
if (base->object->recalc & OB_RECALC_ALL) {
/* TODO(sergey): Ideally, it's not needed. */
- BKE_object_handle_update(G.main->eval_ctx, t->scene, base->object);
+ BKE_object_handle_update(&eval_ctx, t->scene, base->object);
}
}
More information about the Bf-blender-cvs
mailing list