diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 7 |
2 files changed, 8 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index e0448afdec6..e77525d0cb7 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -175,20 +175,8 @@ static ID *collection_owner_get(Main *bmain, ID *id, ID *UNUSED(owner_id_hint)) Collection *master_collection = (Collection *)id; BLI_assert((master_collection->flag & COLLECTION_IS_MASTER) != 0); BLI_assert(master_collection->owner_id != NULL); - -#ifndef NDEBUG - bool is_owner_found = false; - LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { - if (scene->master_collection == master_collection) { - BLI_assert(master_collection->owner_id == &scene->id); - BLI_assert(!is_owner_found); - is_owner_found = true; - } - } - BLI_assert(is_owner_found); -#else - UNUSED_VARS(bmain); -#endif + BLI_assert(GS(master_collection->owner_id->name) == ID_SCE); + BLI_assert(((Scene *)master_collection->owner_id)->master_collection == master_collection); return master_collection->owner_id; } diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index a09f1e70d06..1abb2416b9f 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -93,7 +93,12 @@ static void shapekey_foreach_id(ID *id, LibraryForeachIDData *data) static ID *shapekey_owner_get(Main *UNUSED(bmain), ID *id, ID *UNUSED(owner_id_hint)) { - return ((Key *)id)->from; + Key *key = (Key *)id; + + BLI_assert(key->from != NULL); + BLI_assert(BKE_key_from_id(key->from) == key); + + return key->from; } static void shapekey_blend_write(BlendWriter *writer, ID *id, const void *id_address) |