From 0964ae5266541f09a1d54d8941393bada97d08a2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 4 Feb 2020 18:26:57 +1100 Subject: Fix T73234: Undo/redo with local collection crashes Resolves crashes when edit-mode undo data wasn't included because it wasn't visible, also resolves T73416. --- source/blender/editors/curve/editcurve_undo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/editors/curve') diff --git a/source/blender/editors/curve/editcurve_undo.c b/source/blender/editors/curve/editcurve_undo.c index ff3a1386fd9..8bcabb5ed85 100644 --- a/source/blender/editors/curve/editcurve_undo.c +++ b/source/blender/editors/curve/editcurve_undo.c @@ -216,8 +216,7 @@ static bool curve_undosys_step_encode(struct bContext *C, struct Main *bmain, Un * outside of this list will be moved out of edit-mode when reading back undo steps. */ ViewLayer *view_layer = CTX_data_view_layer(C); uint objects_len = 0; - Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( - view_layer, NULL, &objects_len); + Object **objects = ED_undo_editmode_objects_from_view_layer(view_layer, &objects_len); us->elems = MEM_callocN(sizeof(*us->elems) * objects_len, __func__); us->elems_len = objects_len; -- cgit v1.2.3