Fix T51280: Alembic: Crash when removing cache modifier
authorSybren A. Stüvel <sybren@stuvel.eu>
Wed, 26 Apr 2017 11:01:19 +0000 (13:01 +0200)
committerSybren A. Stüvel <sybren@stuvel.eu>
Wed, 26 Apr 2017 13:19:37 +0000 (15:19 +0200)
The calls to id_us_plus/min were unnecessary (and caused assertion
failures) as this is already taken care of by transformcache_id_looper().

source/blender/blenkernel/intern/constraint.c

index 58ad171ee207f0bed967e960634e7accdd4edd06..c3b209f23330eb5811818ec631f96825d70f57cb 100644 (file)
@@ -4386,20 +4386,12 @@ static void transformcache_copy(bConstraint *con, bConstraint *srccon)
 
        BLI_strncpy(dst->object_path, src->object_path, sizeof(dst->object_path));
        dst->cache_file = src->cache_file;
-
-       if (dst->cache_file) {
-               id_us_plus(&dst->cache_file->id);
-       }
 }
 
 static void transformcache_free(bConstraint *con)
 {
        bTransformCacheConstraint *data = con->data;
 
-       if (data->cache_file) {
-               id_us_min(&data->cache_file->id);
-       }
-
        if (data->reader) {
 #ifdef WITH_ALEMBIC
                CacheReader_free(data->reader);