diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-17 18:53:06 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-17 18:54:06 +0300 |
commit | a96134d79417d05556bcad9a4425bf9056cef133 (patch) | |
tree | e62afb3026253796ae6e95c093e25d846745f822 /source/blender/editors/transform/transform_conversions.c | |
parent | 44183a3535237832e9baadd770c3d629bf4c4de5 (diff) |
Depsgraph: Fix assert/crash when transforming from redo system
Redo system will set depsgraph to NULL, so need to ensure it exists.
Reported by Julian in IRC, thanks!
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 29401bc2da1..0905e3785da 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5540,10 +5540,7 @@ static void set_trans_object_base_flags(TransInfo *t) Main *bmain = G.main; SceneLayer *sl = t->scene_layer; Scene *scene = t->scene; - Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false); - - /* Transform tool is expected to be executed from an evaluated scene. */ - BLI_assert(depsgraph != NULL); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, true); /* * if Base selected and has parent selected: @@ -5644,12 +5641,9 @@ static int count_proportional_objects(TransInfo *t) Main *bmain = G.main; SceneLayer *sl = t->scene_layer; Scene *scene = t->scene; - Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, true); Base *base; - /* Transform tool is expected to be executed from an evaluated scene. */ - BLI_assert(depsgraph != NULL); - /* rotations around local centers are allowed to propagate, so we take all objects */ if (!((t->around == V3D_AROUND_LOCAL_ORIGINS) && (t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL))) |