From c81eca3d986115ae8f3c542e9b00b89795233864 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 4 Apr 2019 15:07:37 +0200 Subject: Fix T63276: crash deleting object with alembic constraint. --- source/blender/blenkernel/intern/constraint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index b22ffce5300..6d7765d4314 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4572,10 +4572,12 @@ static void transformcache_evaluate(bConstraint *con, bConstraintOb *cob, ListBa const float frame = DEG_get_ctime(cob->depsgraph); const float time = BKE_cachefile_time_offset(cache_file, frame, FPS); - BKE_cachefile_ensure_handle(G.main, cache_file); + /* Must always load ABC handle on original. */ + CacheFile *cache_file_orig = (CacheFile *)DEG_get_original_id(&cache_file->id); + BKE_cachefile_ensure_handle(G.main, cache_file_orig); if (!data->reader) { - data->reader = CacheReader_open_alembic_object(cache_file->handle, + data->reader = CacheReader_open_alembic_object(cache_file_orig->handle, data->reader, cob->ob, data->object_path); -- cgit v1.2.3