Commit: c4b93bd440a7a543306fa1ae071ae5611457343b
Author: Jeroen Bakker
Date:   Tue Dec 21 08:18:11 2021 +0100
Branches: temp-T94185-id_remapping-experiment-a
https://developer.blender.org/rBc4b93bd440a7a543306fa1ae071ae5611457343b

Add early exit when remapping multiple.

===================================================================

M       source/blender/blenkernel/intern/lib_remap.c

===================================================================

diff --git a/source/blender/blenkernel/intern/lib_remap.c 
b/source/blender/blenkernel/intern/lib_remap.c
index 0472d968adf..c3423748a2d 100644
--- a/source/blender/blenkernel/intern/lib_remap.c
+++ b/source/blender/blenkernel/intern/lib_remap.c
@@ -552,6 +552,11 @@ void BKE_libblock_remap_multiple_locked(Main *bmain,
                                         const struct IDRemapper *mappings,
                                         const short remap_flags)
 {
+  if (BKE_id_remapper_is_empty(mappings)) {
+    /* Early exit nothing to do. */
+    return;
+  }
+
   LibBlockRemapMultipleUserData user_data;
   user_data.bmain = bmain;
   user_data.remap_flags = remap_flags;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to